Fix dynamic configuration when custom errors are enabled (#2212)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-03-19 12:55:17 -03:00 committed by GitHub
parent de30e53d62
commit 6b7491f432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;