httpPaths: add trailing slash to proxy_pass

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

"If the proxy_pass directive is specified with a URI, then when a request
is passed to the server, the part of a normalized request URI matching the
location is replaced by a URI specified in the directive"
This commit is contained in:
Girish Ramakrishnan
2020-11-21 14:37:36 -08:00
parent d331597bff
commit 1db868bf9c
+2 -1
View File
@@ -254,7 +254,8 @@ server {
<% Object.keys(httpPaths).forEach(function (path) { -%>
location "<%= path %>" {
proxy_pass http://<%= ip %>:<%= httpPaths[path] %>;
# the trailing / will replace part of the original URI matched by the location.
proxy_pass http://<%= ip %>:<%= httpPaths[path] %>/;
}
<% }); %>