From 3598609d9f6a2f2f6398a52cf9e2b13c75cd3738 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 7 Sep 2020 21:00:42 -0500 Subject: [PATCH] =?UTF-8?q?fix(reverse-proxy):=20=F0=9F=90=9B=20proxy=20ca?= =?UTF-8?q?lls=20to=20api=20path=20withou=20trailing=20slash=20to=20upstre?= =?UTF-8?q?am?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reverse-proxy/conf.d.dev/default.conf | 2 +- reverse-proxy/conf.d/default.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reverse-proxy/conf.d.dev/default.conf b/reverse-proxy/conf.d.dev/default.conf index 94c0a6eba..e729c65e9 100644 --- a/reverse-proxy/conf.d.dev/default.conf +++ b/reverse-proxy/conf.d.dev/default.conf @@ -1,7 +1,7 @@ server { listen 80 default_server; - location ^~ /api { + location ^~ /api/ { rewrite ^/api/(.*)$ /$1 break; proxy_pass http://directory-api:80; proxy_http_version 1.1; diff --git a/reverse-proxy/conf.d/default.conf b/reverse-proxy/conf.d/default.conf index 38caa190e..db17d3e65 100644 --- a/reverse-proxy/conf.d/default.conf +++ b/reverse-proxy/conf.d/default.conf @@ -9,7 +9,7 @@ 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 { + location ^~ /api/ { rewrite ^/api/(.*)$ /$1 break; proxy_pass http://directory-api:80; proxy_http_version 1.1;