2023-02-09 19:19:50 -05:00
|
|
|
## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/proxy.conf.sample
|
2020-08-03 11:00:14 -04:00
|
|
|
|
2020-09-25 12:24:44 -04:00
|
|
|
# Timeout if the real server is dead
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
|
|
|
|
|
2020-09-25 12:24:44 -04:00
|
|
|
# Proxy Connection Settings
|
|
|
|
proxy_buffers 32 4k;
|
|
|
|
proxy_connect_timeout 240;
|
|
|
|
proxy_headers_hash_bucket_size 128;
|
|
|
|
proxy_headers_hash_max_size 1024;
|
|
|
|
proxy_http_version 1.1;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_read_timeout 240;
|
2021-10-14 15:01:48 -04:00
|
|
|
proxy_redirect http:// $scheme://;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_send_timeout 240;
|
|
|
|
|
2020-09-25 12:24:44 -04:00
|
|
|
# Proxy Cache and Cookie Settings
|
|
|
|
proxy_cache_bypass $cookie_session;
|
|
|
|
#proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps
|
|
|
|
proxy_no_cache $cookie_session;
|
2020-08-03 11:00:14 -04:00
|
|
|
|
2020-09-25 12:24:44 -04:00
|
|
|
# Proxy Header Settings
|
|
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
proxy_set_header Early-Data $ssl_early_data;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_set_header Host $host;
|
2021-10-26 09:33:36 -04:00
|
|
|
proxy_set_header Proxy "";
|
2020-09-25 12:24:44 -04:00
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2023-02-08 14:24:03 -05:00
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
2021-10-14 15:01:48 -04:00
|
|
|
proxy_set_header X-Forwarded-Method $request_method;
|
2023-02-08 14:24:03 -05:00
|
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
2021-10-14 15:01:48 -04:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Server $host;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_set_header X-Forwarded-Ssl on;
|
2021-10-14 15:01:48 -04:00
|
|
|
proxy_set_header X-Forwarded-Uri $request_uri;
|
2023-02-05 13:05:18 -05:00
|
|
|
proxy_set_header X-Original-Method $request_method;
|
2021-10-14 15:01:48 -04:00
|
|
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
2020-09-25 12:24:44 -04:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|