From 843164bd1e73e116645192bc924b13b2dad0548a Mon Sep 17 00:00:00 2001 From: "dave@tiredofit.ca" Date: Tue, 24 Jan 2023 08:01:14 -0800 Subject: [PATCH] Release 6.2.16 - See CHANGELOG.md --- CHANGELOG.md | 7 +++++++ install/assets/functions/10-nginx | 4 ++-- install/etc/nginx/templates/proxy.template | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 358fd70..a3960d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 6.2.16 2023-01-24 + + ### Changed + - Update "proxy" redirect template to support WS/WSS + - Fix for 'NGINX_ENABLE_FASTCGI_HTTPS' not working (credit joergmschulz@github) + + ## 6.2.15 2022-12-24 ### Changed diff --git a/install/assets/functions/10-nginx b/install/assets/functions/10-nginx index d99fae8..18c8c2a 100755 --- a/install/assets/functions/10-nginx +++ b/install/assets/functions/10-nginx @@ -419,11 +419,11 @@ nginx_configure_server() { ### FastCGI reverse proxy if var_true "${NGINX_ENABLE_FASTCGI_HTTPS}"; then print_notice "Enable Nginx FastCGI HTTPS Termination Support" - sed -i "s|fastcgi_param HTTPS '.*';|fastcgi_param HTTPS 'on';|g" /etc/nginx/fastcgi_params + sed -i "s|fastcgi_param HTTPS .*;|fastcgi_param HTTPS on;|g" /etc/nginx/fastcgi_params PROTOCOL="https://" else print_debug "Disable Nginx FastCGI HTTPS Termination Support" - sed -i "s|fastcgi_param HTTPS '.*';|fastcgi_param HTTPS 'off';|g" /etc/nginx/fastcgi_params + sed -i "s|fastcgi_param HTTPS .*;|fastcgi_param HTTPS off;|g" /etc/nginx/fastcgi_params PROTOCOL="http://" fi diff --git a/install/etc/nginx/templates/proxy.template b/install/etc/nginx/templates/proxy.template index f119648..a2fef2c 100644 --- a/install/etc/nginx/templates/proxy.template +++ b/install/etc/nginx/templates/proxy.template @@ -11,6 +11,17 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; proxy_ssl_server_name on; + + 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; + + proxy_read_timeout 90; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } ### Don't edit past here }