diff options
| author | stuppie | 2026-09-24 16:12:42 -0600 |
|---|---|---|
| committer | stuppie | 2026-09-24 16:12:42 -0600 |
| commit | 1089d48b7c97b3cbab2bab2c420e59233c531931 (patch) | |
| tree | e9cb8bd05abd08a8faad7b31d908896c34720ae2 | |
| parent | a5e1f9d5fe8b1d4e66c240a69eff34a8d0e8dff7 (diff) | |
| download | amt-jb-1089d48b7c97b3cbab2bab2c420e59233c531931.tar.gz amt-jb-1089d48b7c97b3cbab2bab2c420e59233c531931.zip | |
nginx move slash rewrite into location / block so docs is accessable without a slash
| -rw-r--r-- | nginx_amt-jb.conf | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/nginx_amt-jb.conf b/nginx_amt-jb.conf index 0b0f385..a9f1a9f 100644 --- a/nginx_amt-jb.conf +++ b/nginx_amt-jb.conf @@ -16,9 +16,6 @@ server { # max upload size client_max_body_size 1M; # adjust to taste - # Internally add a trailing slash while preserving the request method and body. - rewrite ^([^.]*[^/])$ $1/ break; - location = /favicon.ico { access_log off; return 200 '{}'; @@ -30,20 +27,22 @@ server { return 200 '{"status":"ok"}'; } - location = /docs/ { + location = /docs { include nginx_amt-jb_proxy_pass.conf; - proxy_pass http://uvicorn/docs; + proxy_pass http://uvicorn; } - location = /redoc/ { + location = /redoc { include nginx_amt-jb_proxy_pass.conf; - proxy_pass http://uvicorn/redoc; + proxy_pass http://uvicorn; } - location / { - include nginx_amt-jb_proxy_pass.conf; - proxy_pass http://uvicorn; - add_header Cache-Control "no-store, no-cache, must-revalidate"; + location / { + # Internally add a trailing slash while preserving the request method and body. + rewrite ^([^.]*[^/])$ $1/ break; + include nginx_amt-jb_proxy_pass.conf; + proxy_pass http://uvicorn; + add_header Cache-Control "no-store, no-cache, must-revalidate"; } } |
