Martin Goyot d07b0fcb01
Update X-Forwarded-For header instead of overriding it
When this container is behind a reverse proxy itself it overrides the incoming `X-Forwarded-For` header from the downstream reverse proxy. This is problematic because Snadrop heavily relies on this information to create rooms.
2020-12-25 19:53:11 +01:00

29 lines
645 B
Plaintext

server {
listen 80 default_server;
listen 443 ssl;
root /app/snapdrop/client;
index index.php index.html index.htm;
server_name _;
ssl_certificate /config/keys/cert.crt;
ssl_certificate_key /config/keys/cert.key;
client_max_body_size 0;
location / {
root /app/snapdrop/client;
index index.html index.htm;
}
location /server {
proxy_connect_timeout 300;
proxy_pass http://localhost:3000;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
}
}