update condition and replacement
This commit is contained in:
parent
8216e113e8
commit
a0f8050b5a
1 changed files with 2 additions and 2 deletions
|
@ -276,8 +276,8 @@
|
|||
grpc_pass {{ trim $proto }}://{{ trim $upstream }};
|
||||
{{- else }}
|
||||
proxy_pass {{ trim $proto }}://{{ trim $upstream }}{{ trim $dest }};
|
||||
{{- if not (eq .Path "/") }}
|
||||
proxy_redirect ~^/(.*)$ {{ trimSuffix `/` .Path }}/$1;
|
||||
{{- if (hasPrefix "/" $dest) }}
|
||||
proxy_redirect ~^{{ $dest }}(.*)$ {{ .Path }}$1;
|
||||
{{- end }}
|
||||
set $upstream_keepalive {{ if ne $keepalive "disabled" }}true{{ else }}false{{ end }};
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue