All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 1m4s
- gzip on + gzip_proxied any (zonder die laatste comprimeert nginx geproxyde responses helemaal niet) + gzip_vary + min_length 1024 voor css/js/json/svg/tekst - Geen dubbele compressie: responses die al Content-Encoding dragen (brotli/gzip uit de app) laat nginx ongemoeid; dit vangt alleen wat de app mist - Cache-beleid blijft bewust op één plek (de app), zodat lokaal en productie identiek gedragen - Configtest erbij in security-config-stijl Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149FgUQvuwxKKEdvQGmNngF
33 lines
1.1 KiB
Nginx Configuration File
33 lines
1.1 KiB
Nginx Configuration File
# Behoud het publieke schema van Pangolin/Traefik; val lokaal terug op nginx.
|
|
map $http_x_forwarded_proto $teach_forwarded_proto {
|
|
default $http_x_forwarded_proto;
|
|
"" $scheme;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
server_tokens off;
|
|
|
|
# Wat groter zodat grote borden/afbeeldingen niet geweigerd worden
|
|
client_max_body_size 55m;
|
|
|
|
# Gzip-vangnet: de app comprimeert zelf al (brotli/gzip via @fastify/compress)
|
|
# en nginx comprimeert nooit dubbel (responses mét Content-Encoding blijven
|
|
# ongemoeid) - dit vangt alleen wat de app mist. Let op: zonder
|
|
# gzip_proxied comprimeert nginx geproxyde responses helemaal niet.
|
|
gzip on;
|
|
gzip_proxied any;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_types text/css application/javascript application/json image/svg+xml text/plain;
|
|
|
|
location / {
|
|
proxy_pass http://app:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $teach_forwarded_proto;
|
|
}
|
|
}
|