Skip to content

Commit

Permalink
Update nginx config to access swagger in production, fix doccano#1038
Browse files Browse the repository at this point in the history
  • Loading branch information
Hironsan committed Nov 16, 2020
1 parent 3b743a4 commit fe363b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
Expand Down

0 comments on commit fe363b8

Please sign in to comment.