- Dockerfile: nginx:1.27-alpine serving the exported site, PORT from env, /healthz healthcheck, origin rewrite hook in docker-entrypoint.d - docker/default.conf.template: envsubst PORT, clean URLs without trailing-slash redirect, long cache for hashed assets, no-cache for HTML/sw.js/manifest, 301 http->https via X-Forwarded-Proto, gzip - docker/security-headers.conf: single include so add_header survives per location - docker-compose.yml (Dokploy, no host ports) + docker-compose.override.yml (local) - bake canonical/OG/sitemap/robots origin to https://alterflixhub.hobbypj.com (was the export-time 127.0.0.1:8090), overridable via PUBLIC_ORIGIN - docs/deploy-dokploy.md
7 lines
542 B
Plaintext
7 lines
542 B
Plaintext
# ชุด header ความปลอดภัย — ใช้ `include snippets/security-headers.conf;` ในทุก location
|
|
# (จำเป็นเพราะ nginx ทิ้ง add_header ของ parent ทันทีที่ location นิยาม add_header เอง)
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|