-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCaddyfile.example
More file actions
31 lines (27 loc) · 972 Bytes
/
Caddyfile.example
File metadata and controls
31 lines (27 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# CraftCommand - Caddy Reverse Proxy Configuration (Smart Template)
# ==============================================================================
# INSTRUCTIONS:
# 1. Replace 'your-panel.com' with your actual domain or dynamic DNS (e.g. lbogos.duckdns.org)
# 2. Ensure Port 80 and 443 are open in your router/firewall.
# 3. Run: caddy.exe run --config Caddyfile
your-panel.com {
# [1] Backend API & Real-time WebSocket
handle /api/* {
reverse_proxy localhost:3001
}
handle /socket.io/* {
reverse_proxy localhost:3001
}
# [2] Frontend Dashboard (Smart Logic)
# We proxy to port 3000 so we don't have to worry about absolute file paths.
handle {
reverse_proxy localhost:3000
}
# [3] Security Hardening
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Frame-Options "SAMEORIGIN"
X-Content-Type-Options "nosniff"
-Server
}
}