proxyAuth: allow protecting specific subpath
while I don't think this is useful for apps, it is useful for e2e test atleast
This commit is contained in:
@@ -238,11 +238,18 @@ server {
|
||||
index index.html index.htm;
|
||||
}
|
||||
<% } else if ( endpoint === 'app' ) { %>
|
||||
location = /appstatus.html {
|
||||
}
|
||||
|
||||
<% if (proxyAuth.enabled) { %>
|
||||
location "<%= proxyAuth.path %>" {
|
||||
auth_request /proxy-auth;
|
||||
auth_request_set $auth_cookie $upstream_http_set_cookie;
|
||||
add_header Set-Cookie $auth_cookie;
|
||||
error_page 401 = @proxy-auth-login;
|
||||
|
||||
proxy_pass http://<%= ip %>:<%= port %>;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% Object.keys(httpPaths).forEach(function (path) { -%>
|
||||
@@ -251,9 +258,6 @@ server {
|
||||
}
|
||||
<% }); %>
|
||||
|
||||
location = /appstatus.html {
|
||||
}
|
||||
|
||||
proxy_pass http://<%= ip %>:<%= port %>;
|
||||
<% } else if ( endpoint === 'redirect' ) { %>
|
||||
# redirect everything to the app. this is temporary because there is no way
|
||||
|
||||
Reference in New Issue
Block a user