-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
32 lines (28 loc) · 922 Bytes
/
Copy pathCaddyfile
File metadata and controls
32 lines (28 loc) · 922 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
32
# CodeArena — reverse proxy + automatic HTTPS for codearena.kodexa.in
#
# Default: Caddy provisions a Let's Encrypt cert automatically (works when the
# DNS record is "DNS only" / grey-cloud in Cloudflare, or not proxied).
#
# If you put Cloudflare in front (orange-cloud, recommended for CDN + DDoS),
# either use a Cloudflare Origin Certificate here:
# tls /etc/caddy/origin.pem /etc/caddy/origin.key
# and set Cloudflare SSL mode to Full (Strict); or use the Cloudflare DNS
# challenge (needs the caddy-dns/cloudflare plugin + a CF API token).
codearena.kodexa.in {
encode zstd gzip
# API + realtime → backend
@api path /api/* /socket.io/*
handle @api {
reverse_proxy backend:8080
}
# Everything else → the SPA (nginx)
handle {
reverse_proxy frontend:80
}
header {
X-Frame-Options SAMEORIGIN
X-Content-Type-Options nosniff
Referrer-Policy strict-origin-when-cross-origin
-Server
}
}