nginx slash redirect uses https (#1731)

This commit is contained in:
Sam Darwin
2025-04-04 14:22:54 -06:00
committed by GitHub
parent 937c799c7f
commit 98a10467c9

View File

@@ -63,7 +63,12 @@ data:
location @django2 {
if ($uri !~* /$ ) {
rewrite ^(.*)$ $1/ redirect;
# "basic" redirect, adding a slash:
# rewrite ^(.*)$ $1/ redirect;
#
# instead, redirect everything to https
# (since nginx is only seeing http at the pod)
rewrite ^(.*)$ https://$host$1/ redirect;
}
proxy_pass http://unix:/run/gunicorn.sock;
}