All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 47s
57 lines
2 KiB
Nginx Configuration File
57 lines
2 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 /api/my/live-actions/ {
|
|
proxy_pass http://app:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
gzip off;
|
|
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;
|
|
}
|
|
|
|
location /api/progress/live/ {
|
|
proxy_pass http://app:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
gzip off;
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|