Fix dynamic configuration when custom errors are enabled (#2212)
This commit is contained in:
parent
de30e53d62
commit
6b7491f432
2 changed files with 3 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
@ -591,6 +591,7 @@ stream {
|
|||
|
||||
{{/* definition of templates to avoid repetitions */}}
|
||||
{{ define "CUSTOM_ERRORS" }}
|
||||
{{ $dynamicConfig := .DynamicConfigurationEnabled}}
|
||||
{{ $proxySetHeaders := .ProxySetHeaders }}
|
||||
{{ range $errCode := .Cfg.CustomHTTPErrors }}
|
||||
location @custom_{{ $errCode }} {
|
||||
|
@ -607,7 +608,7 @@ stream {
|
|||
|
||||
rewrite (.*) / break;
|
||||
|
||||
{{ if .DynamicConfigurationEnabled }}
|
||||
{{ if $dynamicConfig }}
|
||||
proxy_pass http://upstream_balancer;
|
||||
{{ else }}
|
||||
proxy_pass http://upstream-default-backend;
|
||||
|
|
Loading…
Reference in a new issue