From 916b6a06d21aade1031fc931bc87aafd0ea5c5fe Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Thu, 10 Jan 2019 10:27:23 -0300 Subject: [PATCH] Empty access_by_lua_block breaks satisfy any --- rootfs/etc/nginx/template/nginx.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 381098dbe..5931658a2 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -1032,8 +1032,10 @@ stream { rewrite_by_lua_block { balancer.rewrite() } + + {{ if shouldConfigureLuaRestyWAF $all.Cfg.DisableLuaRestyWAF $location.LuaRestyWAF.Mode }} + access_by_lua_block { - {{ if shouldConfigureLuaRestyWAF $all.Cfg.DisableLuaRestyWAF $location.LuaRestyWAF.Mode }} local lua_resty_waf = require("resty.waf") local waf = lua_resty_waf:new() @@ -1074,8 +1076,9 @@ stream { {{ end }} waf:exec() - {{ end }} } + {{ end }} + header_filter_by_lua_block { {{ if shouldConfigureLuaRestyWAF $all.Cfg.DisableLuaRestyWAF $location.LuaRestyWAF.Mode }} local lua_resty_waf = require "resty.waf"