Scout/deploy/nginx.conf
2026-08-31 00:06:06 +08:00

48 lines
1.3 KiB
Nginx Configuration File

map $http_x_forwarded_proto $scout_forwarded_proto {
default $http_x_forwarded_proto;
"" $scheme;
}
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 512m;
location /api/v1/updates/stream {
proxy_pass http://scout:8080;
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 $scout_forwarded_proto;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 1h;
}
location /api/ {
proxy_pass http://scout:8080;
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 $scout_forwarded_proto;
proxy_request_buffering off;
proxy_read_timeout 10m;
}
location = /healthz {
proxy_pass http://scout:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scout_forwarded_proto;
}
location / {
try_files $uri $uri/ /index.html;
}
}