File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,27 @@ server {
1919 }
2020
2121 # Django admin
22- location ^~ ^/${DJANGO_ADMIN_URL}/ {
22+ location /${DJANGO_ADMIN_URL} {
23+ return 301 https://$host/${DJANGO_ADMIN_URL}/;
24+ }
25+
26+ location ^~ /${DJANGO_ADMIN_URL}/ {
2327 proxy_set_header X-Forwarded-Proto https;
2428 proxy_set_header Host $http_host;
2529 proxy_set_header X-Forwarded-For $remote_addr;
2630 proxy_redirect off;
2731 proxy_pass http://backend_server;
2832 }
2933
34+ # Django statics
35+ location ^~ /static/ {
36+ proxy_set_header X-Forwarded-Proto https;
37+ proxy_set_header Host $http_host;
38+ proxy_set_header X-Forwarded-For $remote_addr;
39+ proxy_redirect off;
40+ proxy_pass http://backend_server;
41+ }
42+
3043 # Next static export
3144 location ~* ^/mailbox/[^/]+$ {
3245 try_files /mailbox/[mailboxId].html =404;
You can’t perform that action at this time.
0 commit comments