forked from 0xfurai/peekaping
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
48 lines (42 loc) · 1.15 KB
/
Caddyfile
File metadata and controls
48 lines (42 loc) · 1.15 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
:8383 {
# Handle API routes - proxy to Go server (must be first with explicit handle)
handle /api/* {
reverse_proxy localhost:8034
}
# Handle WebSocket connections
handle /socket.io/* {
reverse_proxy localhost:8034
}
# Serve static files from /app/web
root * /app/web
# Handle env.js with no caching
handle /env.js {
header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
file_server
}
# Handle static assets with caching
@static path *.js *.css *.mjs *.woff *.woff2 *.svg *.png *.jpg *.jpeg *.gif *.ico
handle @static {
header Cache-Control "public, max-age=31536000, immutable"
file_server
}
# Handle everything else as SPA (single page application)
handle {
try_files {path} {path}/ /index.html
file_server
}
# Enable logging
log {
output stdout
format append {
fields {
svc peekaping:gateway
}
wrap json {
time_format iso8601
message_key msg
}
}
level info
}
}