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:
+2
-1
@@ -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] %>/;
|
||||
}
|
||||
<% }); %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user