Skip to content

Commit

Permalink
nginx: detect HTTPS reverse proxy and forward the information to PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdrake101 committed Oct 4, 2024
1 parent 01c65a3 commit 1cf5178
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker-compose/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
map $http_x_forwarded_proto $fastcgi_param_https {
default '';
https 'on';
}

server {
index dir2cast.php;
server_name dir2cast;
Expand Down Expand Up @@ -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;
}
}

0 comments on commit 1cf5178

Please sign in to comment.