Skip to content

Commit

Permalink
commented out the 301 rewrite for append slash, handling at django level
Browse files Browse the repository at this point in the history
  • Loading branch information
deronsmith committed Nov 25, 2024
1 parent b826796 commit 7a7f212
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hms_nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ server {
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
if ($request_method = GET){
rewrite ^([^.\?]*[^/])$ $1/ permanent;
}

server_tokens off;

Expand All @@ -37,6 +34,10 @@ server {
alias /src/collected_static/hms/;
}

; if ($request_method = GET){
; rewrite ^([^.\?]*[^/])$ $1/ permanent;
; }

location / {
try_files $uri @hms_django;
}
Expand All @@ -48,7 +49,7 @@ server {
proxy_send_timeout 1200;
uwsgi_read_timeout 1200s;
uwsgi_send_timeout 1200s;
proxy_set_header Host $host;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Expand Down

0 comments on commit 7a7f212

Please sign in to comment.