Browse Source

Update nginx config to access swagger in production, fix #1038

pull/1047/head
Hironsan 4 years ago
parent
commit
fe363b89a2
1 changed files with 12 additions and 0 deletions
  1. 12
      nginx/nginx.conf

12
nginx/nginx.conf

@ -31,6 +31,18 @@ server {
return 301 /admin/;
}
location /swagger/ {
proxy_pass http://backend:8000/swagger/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location = /swagger {
absolute_redirect off;
return 301 /swagger/;
}
location /static/ {
autoindex on;
alias /static/;

Loading…
Cancel
Save