Browse Source
Merge pull request #1047 from doccano/fix/#1038
Update nginx config to access swagger in production, fix #1038
pull/1051/head
Hiroki Nakayama
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
0 deletions
-
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/; |
|
|
|