mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-04-08 12:07:57 +00:00
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
# Test basic reverse proxy to changedetection.io
|
|
location / {
|
|
proxy_pass http://changedet-app:5000;
|
|
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 $scheme;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# Test subpath deployment with X-Forwarded-Prefix
|
|
location /changedet-sub/ {
|
|
proxy_pass http://changedet-app:5000/;
|
|
proxy_set_header X-Forwarded-Prefix /changedet-sub;
|
|
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 $scheme;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
}
|