From 796176457ee07a7a210d22a0e2f02400a4d6319e Mon Sep 17 00:00:00 2001 From: jamesdrake101 <183869420+jamesdrake101@users.noreply.github.com> Date: Fri, 4 Oct 2024 20:46:48 +0000 Subject: [PATCH] nginx: detect HTTPS reverse proxy and forward the information to PHP --- docker-compose/nginx/default.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-compose/nginx/default.conf b/docker-compose/nginx/default.conf index f2ab099..5b63bf5 100644 --- a/docker-compose/nginx/default.conf +++ b/docker-compose/nginx/default.conf @@ -1,3 +1,8 @@ +map $http_x_forwarded_proto $fastcgi_param_https { + default ''; + https 'on'; +} + server { index dir2cast.php; server_name dir2cast; @@ -27,5 +32,8 @@ server { # Security feature. See https://httpoxy.org/ fastcgi_param HTTP_PROXY ""; + + # Make sure PHP knows we're using HTTPS + fastcgi_param HTTPS $fastcgi_param_https; } }