Files
panel/Caddyfile
kastov 0f319dc853
2025-11-05 22:45:34 +03:00

41 lines
583 B
Caddyfile

# global options
{
admin off
persist_config off
auto_https off
# log {
# format json
# }
servers {
trusted_proxies static private_ranges 100.0.0.0/8
}
}
:{$PORT:8080} {
handle /health {
respond "OK" 200
}
@notMainDomain {
not header Host docs.rw
}
redir @notMainDomain https://docs.rw{uri} permanent
@mainDomain {
header Host docs.rw
}
handle @mainDomain {
root * /app/build
encode gzip
file_server
try_files {path} /index.html
header {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
}
}
}