From 1cf5178cb87c08098769e679f700503773b742f1 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; } }