39 lines
1.1 KiB
Caddyfile
39 lines
1.1 KiB
Caddyfile
http://packages.example.com {
|
|
encode gzip
|
|
|
|
header {
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "DENY"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
Permissions-Policy "camera=(), microphone=(), geolocation=()"
|
|
Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self' data:; font-src 'self'; frame-ancestors 'none'"
|
|
}
|
|
|
|
handle /api/v1/updates/stream {
|
|
reverse_proxy scout:8080 {
|
|
flush_interval -1
|
|
header_up Host {host}
|
|
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
|
|
}
|
|
}
|
|
|
|
handle /api/* {
|
|
request_body {
|
|
max_size 512MB
|
|
}
|
|
reverse_proxy scout:8080 {
|
|
header_up Host {host}
|
|
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
|
|
}
|
|
}
|
|
|
|
handle /healthz {
|
|
reverse_proxy scout:8080
|
|
}
|
|
|
|
root * /srv/scout/frontend/dist
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|
|
|