From fe363b89a2c58373eb794bd23b4467d01d9eebcb Mon Sep 17 00:00:00 2001 From: Hironsan Date: Mon, 16 Nov 2020 15:12:19 +0900 Subject: [PATCH] Update nginx config to access swagger in production, fix #1038 --- nginx/nginx.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 82e87607..3d482f4c 100644 --- a/nginx/nginx.conf +++ b/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/;