From 2a85dffce6a4da810e208321d746780b2a401d9b Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 3 Oct 2020 15:04:12 -0500 Subject: [PATCH] =?UTF-8?q?fix(services):=20=F0=9F=9A=91=F0=9F=90=9B=20try?= =?UTF-8?q?=20fix=20routing=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reverse-proxy/conf.d.dev/default.conf | 6 ++++-- reverse-proxy/conf.d/default.conf | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/reverse-proxy/conf.d.dev/default.conf b/reverse-proxy/conf.d.dev/default.conf index 4eac76ef5..cc912d81c 100644 --- a/reverse-proxy/conf.d.dev/default.conf +++ b/reverse-proxy/conf.d.dev/default.conf @@ -1,7 +1,8 @@ server { listen 80 default_server; - location /api/directory { + location ^~ /api/directory/ { + rewrite ^/api/directory/(.*)$ /$1 break; proxy_pass http://directory-api:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -12,7 +13,8 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - location /api { + location ^~ /api/ { + rewrite ^/api/(.*)$ /$1 break; proxy_pass http://api-docs:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/reverse-proxy/conf.d/default.conf b/reverse-proxy/conf.d/default.conf index 4b3cb0532..027c327ce 100644 --- a/reverse-proxy/conf.d/default.conf +++ b/reverse-proxy/conf.d/default.conf @@ -9,7 +9,8 @@ server { add_header Content-Security-Policy "default-src 'none'; connect-src 'self'; img-src 'self' data:; manifest-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';" always; - location /api/directory { + location ^~ /api/directory/ { + rewrite ^/api/directory/(.*)$ /$1 break; proxy_pass http://directory-api:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -20,7 +21,8 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - location /api { + location ^~ /api/ { + rewrite ^/api/(.*)$ /$1 break; proxy_pass http://api-docs:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;