From 1a5fc894d627d51b42d7ef3a537dab3838f2ee51 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 11 Jan 2021 21:52:41 -0800 Subject: [PATCH] Fix proxyAuth nginx config --- src/nginxconfig.ejs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/nginxconfig.ejs b/src/nginxconfig.ejs index 8afd78c5a..861e130df 100644 --- a/src/nginxconfig.ejs +++ b/src/nginxconfig.ejs @@ -268,6 +268,17 @@ server { proxy_pass http://<%= ip %>:<%= port %>; } + + <% if (proxyAuth.location !== '/') { %> + location / { + proxy_pass http://<%= ip %>:<%= port %>; + } + <% } %> + + <% } else { %> + location / { + proxy_pass http://<%= ip %>:<%= port %>; + } <% } %> <% Object.keys(httpPaths).forEach(function (path) { -%> @@ -277,9 +288,6 @@ server { } <% }); %> - location / { - proxy_pass http://<%= ip %>:<%= port %>; - } <% } else if ( endpoint === 'redirect' ) { %> # redirect everything to the app. this is temporary because there is no way # to clear a permanent redirect on the browser