Skip to content

Commit c230a05

Browse files
authored
Merge pull request #15 from linuxserver/sorting
Cleanups and reordering
2 parents 6d8b490 + 2c78490 commit c230a05

File tree

4 files changed

+37
-39
lines changed

4 files changed

+37
-39
lines changed

readme-vars.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ app_setup_block: |
139139
2. Review our repository commits and apply the new changes yourself
140140
3. Delete the modified config file with listed updates, restart the container, reapply your changes
141141
* If you have NOT modified a file with noted changes in the changelog:
142-
1. Delete the config file with listed updates, restart the container, reapply your changes
142+
1. Delete the config file with listed updates, restart the container
143143
* Proxy sample updates are not listed in the changelog. See the changes here: [https://github.com/linuxserver/reverse-proxy-confs/commits/master](https://github.com/linuxserver/reverse-proxy-confs/commits/master)
144144
* Proxy sample files WILL be updated, however your renamed (enabled) proxy files will not.
145145
* You can check the new sample and adjust your active config as needed.
@@ -149,7 +149,8 @@ app_setup_nginx_reverse_proxy_block: ""
149149

150150
# changelog
151151
changelogs:
152-
- { date: "20.09.20:", desc: "Update nginx.conf - Added geoip2 configs. Added MAXMINDDB_LICENSE_KEY variable to readme."}
152+
- { date: "04.10.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, proxy.conf, and ssl.conf - Minor cleanups and reordering." }
153+
- { date: "20.09.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf - Added geoip2 configs. Added MAXMINDDB_LICENSE_KEY variable to readme."}
153154
- { date: "08.09.20:", desc: "Add php7-xsl." }
154-
- { date: "01.09.20:", desc: "Update nginx.conf and proxy.conf (and various proxy samples) to better handle websockets." }
155+
- { date: "01.09.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, proxy.conf, and various proxy samples - Global websockets across all configs." }
155156
- { date: "03.08.20:", desc: "Initial release." }

root/defaults/nginx.conf

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2020/09/20 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
1+
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
22

33
user abc;
44
worker_processes 4;
@@ -16,21 +16,21 @@ http {
1616
# Basic Settings
1717
##
1818

19+
client_body_buffer_size 128k;
20+
client_max_body_size 0;
21+
keepalive_timeout 65;
22+
large_client_header_buffers 4 16k;
23+
send_timeout 5m;
1924
sendfile on;
20-
tcp_nopush on;
2125
tcp_nodelay on;
22-
keepalive_timeout 65;
26+
tcp_nopush on;
2327
types_hash_max_size 2048;
2428
variables_hash_max_size 2048;
25-
large_client_header_buffers 4 16k;
2629

2730
# server_tokens off;
28-
2931
# server_names_hash_bucket_size 64;
3032
# server_name_in_redirect off;
3133

32-
client_max_body_size 0;
33-
3434
include /etc/nginx/mime.types;
3535
default_type application/octet-stream;
3636

@@ -90,9 +90,9 @@ http {
9090
##
9191
# Geoip2 config
9292
##
93-
# Uncomment to add the Geoip2 configs needed to geo block countries/cities.
93+
# Uncomment to add the Geoip2 configs needed to geo block countries/cities.
9494
##
95-
95+
9696
#include /config/nginx/geoip2.conf;
9797
}
9898

root/defaults/proxy.conf

+19-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
1-
## Version 2020/09/01 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/proxy.conf
1+
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/proxy.conf
22

3-
client_body_buffer_size 128k;
4-
5-
#Timeout if the real server is dead
3+
# Timeout if the real server is dead
64
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
75

8-
# Advanced Proxy Config
9-
send_timeout 5m;
6+
# Proxy Connection Settings
7+
proxy_buffers 32 4k;
8+
proxy_connect_timeout 240;
9+
proxy_headers_hash_bucket_size 128;
10+
proxy_headers_hash_max_size 1024;
11+
proxy_http_version 1.1;
1012
proxy_read_timeout 240;
13+
proxy_redirect http:// $scheme://;
1114
proxy_send_timeout 240;
12-
proxy_connect_timeout 240;
1315

14-
# TLS 1.3 early data
15-
proxy_set_header Early-Data $ssl_early_data;
16+
# Proxy Cache and Cookie Settings
17+
proxy_cache_bypass $cookie_session;
18+
#proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps
19+
proxy_no_cache $cookie_session;
1620

17-
# Basic Proxy Config
21+
# Proxy Header Settings
22+
proxy_set_header Connection $connection_upgrade;
23+
proxy_set_header Early-Data $ssl_early_data;
1824
proxy_set_header Host $host;
19-
proxy_set_header X-Real-IP $remote_addr;
25+
proxy_set_header Upgrade $http_upgrade;
2026
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21-
proxy_set_header X-Forwarded-Proto https;
2227
proxy_set_header X-Forwarded-Host $host;
28+
proxy_set_header X-Forwarded-Proto https;
2329
proxy_set_header X-Forwarded-Ssl on;
24-
proxy_redirect http:// $scheme://;
25-
proxy_http_version 1.1;
26-
proxy_set_header Upgrade $http_upgrade;
27-
proxy_set_header Connection $connection_upgrade;
28-
#proxy_cookie_path / "/; HTTPOnly; Secure"; # enable at your own risk, may break certain apps
29-
proxy_cache_bypass $cookie_session;
30-
proxy_no_cache $cookie_session;
31-
proxy_buffers 32 4k;
32-
proxy_headers_hash_bucket_size 128;
33-
proxy_headers_hash_max_size 1024;
30+
proxy_set_header X-Real-IP $remote_addr;

root/defaults/ssl.conf

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2020/06/17 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
1+
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
22

33
### Mozilla Recommendations
44
# generated 2020-06-17, Mozilla Guideline v5.4, nginx 1.18.0-r0, OpenSSL 1.1.1g-r0, intermediate configuration
@@ -39,10 +39,10 @@ ssl_early_data on;
3939
#add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
4040

4141
# Optional additional headers
42+
#add_header Cache-Control "no-transform" always;
4243
#add_header Content-Security-Policy "upgrade-insecure-requests";
43-
#add_header X-Frame-Options "SAMEORIGIN" always;
44-
#add_header X-XSS-Protection "1; mode=block" always;
44+
#add_header Referrer-Policy "same-origin" always;
4545
#add_header X-Content-Type-Options "nosniff" always;
46+
#add_header X-Frame-Options "SAMEORIGIN" always;
4647
#add_header X-UA-Compatible "IE=Edge" always;
47-
#add_header Cache-Control "no-transform" always;
48-
#add_header Referrer-Policy "same-origin" always;
48+
#add_header X-XSS-Protection "1; mode=block" always;

0 commit comments

Comments
 (0)