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