diff --git a/nginx.tmpl b/nginx.tmpl index fefb07f..ff04268 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -276,6 +276,9 @@ grpc_pass {{ trim $proto }}://{{ trim $upstream }}; {{- else }} proxy_pass {{ trim $proto }}://{{ trim $upstream }}{{ trim $dest }}; + {{- if not (eq .Path "/") }} + proxy_redirect ~^/(.*)$ {{ trimSuffix `/` .Path }}/$1; + {{- end }} set $upstream_keepalive {{ if ne $keepalive "disabled" }}true{{ else }}false{{ end }}; {{- end }}