Fix dynamic configuration when custom errors are enabled

This commit is contained in:
Manuel de Brito Fontes 2018-03-19 12:04:30 -03:00
parent de30e53d62
commit 8c1d489687
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
2 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -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;