Fix incorrect .DisableLua access. (#3144)

* Fix incorrect .DisableLua access.

* Address comment.
This commit is contained in:
Markus Padourek 2018-09-26 19:05:05 +02:00 committed by Manuel Alejandro de Brito Fontes
parent a7c2633e4e
commit bf4be49c02

View file

@ -762,6 +762,7 @@ stream {
{{ define "CUSTOM_ERRORS" }} {{ define "CUSTOM_ERRORS" }}
{{ $dynamicConfig := .DynamicConfigurationEnabled}} {{ $dynamicConfig := .DynamicConfigurationEnabled}}
{{ $proxySetHeaders := .ProxySetHeaders }} {{ $proxySetHeaders := .ProxySetHeaders }}
{{ $isLuaDisabled := .DisableLua }}
{{ range $errCode := .Cfg.CustomHTTPErrors }} {{ range $errCode := .Cfg.CustomHTTPErrors }}
location @custom_{{ $errCode }} { location @custom_{{ $errCode }} {
internal; internal;
@ -786,7 +787,7 @@ stream {
{{ else }} {{ else }}
proxy_pass http://upstream-default-backend; proxy_pass http://upstream-default-backend;
{{ end }} {{ end }}
{{ if not .DisableLua }} {{ if not $isLuaDisabled }}
log_by_lua_block { log_by_lua_block {
monitor.call() monitor.call()
} }