Fix incorrect .DisableLua access. (#3144)
* Fix incorrect .DisableLua access. * Address comment.
This commit is contained in:
parent
a7c2633e4e
commit
bf4be49c02
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue