Fix redirects of backends with port other than 80
This commit is contained in:
parent
74512c1276
commit
91e150ebf4
1 changed files with 4 additions and 1 deletions
|
@ -214,6 +214,10 @@ http {
|
|||
more_set_headers "Strict-Transport-Security: max-age={{ $cfg.HSTSMaxAge }}{{ if $cfg.HSTSIncludeSubdomains }}; includeSubDomains{{ end }}; preload";
|
||||
{{ end }}
|
||||
|
||||
{{ if not (eq $server.Hostname "_") }}
|
||||
proxy_redirect ~https?://{{ $server.Hostname }}:?[0-9]*/(.*) /$1;
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.EnableVtsStatus }}vhost_traffic_status_filter_by_set_key $geoip_country_code country::$server_name;{{ end }}
|
||||
|
||||
{{ range $location := $server.Locations }}
|
||||
|
@ -308,7 +312,6 @@ http {
|
|||
proxy_send_timeout {{ $location.Proxy.SendTimeout }}s;
|
||||
proxy_read_timeout {{ $location.Proxy.ReadTimeout }}s;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size "{{ $location.Proxy.BufferSize }}";
|
||||
|
||||
|
|
Loading…
Reference in a new issue