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 }};
|
grpc_pass {{ trim $proto }}://{{ trim $upstream }};
|
||||||
{{- else }}
|
{{- else }}
|
||||||
proxy_pass {{ trim $proto }}://{{ trim $upstream }}{{ trim $dest }};
|
proxy_pass {{ trim $proto }}://{{ trim $upstream }}{{ trim $dest }};
|
||||||
{{- if not (eq .Path "/") }}
|
{{- if (hasPrefix "/" $dest) }}
|
||||||
proxy_redirect ~^/(.*)$ {{ trimSuffix `/` .Path }}/$1;
|
proxy_redirect ~^{{ $dest }}(.*)$ {{ .Path }}$1;
|
||||||
{{- end }}
|
{{- end }}
|
||||||
set $upstream_keepalive {{ if ne $keepalive "disabled" }}true{{ else }}false{{ end }};
|
set $upstream_keepalive {{ if ne $keepalive "disabled" }}true{{ else }}false{{ end }};
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue