correctly handle redirect logic for path-base routing
This commit is contained in:
parent
94fb8459cd
commit
8216e113e8
1 changed files with 3 additions and 0 deletions
|
@ -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 }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue