Skip to content

Commit 1823658

Browse files
authored
Update pocketid.subdomain.conf.sample
1 parent b72eaee commit 1823658

1 file changed

Lines changed: 48 additions & 13 deletions

File tree

pocketid.subdomain.conf.sample

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
server {
66
listen 443 ssl;
7-
# listen 443 quic;
7+
listen 443 quic;
88
listen [::]:443 ssl;
9-
# listen [::]:443 quic;
9+
listen [::]:443 quic;
1010

1111
server_name pocketid.*;
1212

@@ -28,10 +28,7 @@ server {
2828

2929
if ($lan-ip = yes) { set $geo-whitelist yes; }
3030
if ($geo-whitelist = no) { return 404; }
31-
32-
33-
34-
location / {
31+
location / {
3532
# enable the next two lines for http auth
3633
#auth_basic "Restricted";
3734
#auth_basic_user_file /config/nginx/.htpasswd;
@@ -48,20 +45,58 @@ server {
4845
# enable for Tinyauth (requires tinyauth-server.conf in the server block)
4946
#include /config/nginx/tinyauth-location.conf;
5047

51-
include /config/nginx/proxy.conf;
48+
# include /config/nginx/proxy.conf;
5249
include /config/nginx/resolver.conf;
5350
set $upstream_app pocketid;
5451
set $upstream_port 1411;
5552
set $upstream_proto http;
5653
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
5754

58-
# proxy_set_header X-Forwarded-Host $http_host;
59-
# proxy_set_header X-Scheme $scheme;
60-
61-
# proxy_buffer_size 256k;
62-
# proxy_buffers 4 512k;
63-
# proxy_busy_buffers_size 512k;
55+
## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/proxy.conf.sample
56+
57+
# Timeout if the real server is dead
58+
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
59+
60+
# Proxy Connection Settings
61+
#### proxy_buffers 32 4k;
62+
proxy_connect_timeout 240;
63+
proxy_headers_hash_bucket_size 128;
64+
proxy_headers_hash_max_size 1024;
65+
proxy_http_version 1.1;
66+
proxy_read_timeout 240;
67+
proxy_redirect http:// $scheme://;
68+
proxy_send_timeout 240;
69+
70+
# Proxy Cache and Cookie Settings
71+
proxy_cache_bypass $cookie_session;
72+
#proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps
73+
proxy_no_cache $cookie_session;
74+
# Proxy Header Settings
75+
proxy_set_header Connection $connection_upgrade;
76+
proxy_set_header Early-Data $ssl_early_data;
77+
proxy_set_header Host $host;
78+
proxy_set_header Proxy "";
79+
proxy_set_header Upgrade $http_upgrade;
80+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
81+
proxy_set_header X-Forwarded-Host $host;
82+
proxy_set_header X-Forwarded-Method $request_method;
83+
proxy_set_header X-Forwarded-Port $server_port;
84+
proxy_set_header X-Forwarded-Proto $scheme;
85+
proxy_set_header X-Forwarded-Server $host;
86+
proxy_set_header X-Forwarded-Ssl on;
87+
proxy_set_header X-Forwarded-Uri $request_uri;
88+
proxy_set_header X-Original-Method $request_method;
89+
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
90+
proxy_set_header X-Real-IP $remote_addr;
91+
92+
proxy_buffer_size 256k;
93+
proxy_buffers 4 512k;
94+
proxy_busy_buffers_size 512k;
6495

6596

6697
}
6798
}
99+
100+
101+
102+

0 commit comments

Comments
 (0)