Optimizations: switch to static-web-server + Caddy reverse proxy docs #1
@@ -17,15 +17,16 @@ log-level = "info"
|
|||||||
|
|
||||||
#### Performance / caching
|
#### Performance / caching
|
||||||
|
|
||||||
# On-the-fly gzip, brotli and zstd compression (replaces nginx `gzip on`)
|
# Compression is handled by the upstream reverse proxy, so it is disabled
|
||||||
compression = true
|
# here to avoid doing the work twice (wasted CPU per request). Re-enable if
|
||||||
|
# SWS is ever exposed directly without a compressing proxy in front.
|
||||||
# Serve pre-compressed .gz/.br/.zst files from disk when present
|
compression = false
|
||||||
compression-static = true
|
compression-static = false
|
||||||
|
|
||||||
# Emit Cache-Control + ETag headers with sensible per-content-type defaults.
|
# Emit Cache-Control + ETag headers with sensible per-content-type defaults.
|
||||||
# SWS applies long-lived caching to static assets (images, css, js, fonts)
|
# The origin is the correct place to declare cacheability; the proxy/CDN
|
||||||
# and short/no-cache to HTML, replacing the manual nginx `expires 1y` blocks.
|
# passes these through. SWS applies long-lived caching to static assets
|
||||||
|
# (images, css, js, fonts) and short/no-cache to HTML.
|
||||||
cache-control-headers = true
|
cache-control-headers = true
|
||||||
|
|
||||||
#### Routing
|
#### Routing
|
||||||
@@ -36,8 +37,10 @@ page-fallback = "/public/index.html"
|
|||||||
|
|
||||||
#### Security
|
#### Security
|
||||||
|
|
||||||
# Opinionated security headers (safe defaults for a static site)
|
# Security headers are set by the upstream reverse proxy, so they are
|
||||||
security-headers = true
|
# disabled here to avoid duplicate/conflicting headers. Let one layer own
|
||||||
|
# the security posture. Re-enable if SWS is exposed without such a proxy.
|
||||||
|
security-headers = false
|
||||||
|
|
||||||
# Health endpoint at /health for container/K8s liveness probes
|
# Health endpoint at /health for container/K8s liveness probes
|
||||||
health = true
|
health = true
|
||||||
|
|||||||
Reference in New Issue
Block a user