UPT: annotation enhancement for resty-lua-waf
This commit is contained in:
parent
a3bf5dadaf
commit
04a89ce234
5 changed files with 140 additions and 10 deletions
|
|
@ -891,9 +891,23 @@ stream {
|
|||
|
||||
waf:set_option("mode", "{{ $location.LuaRestyWAF.Mode }}")
|
||||
waf:set_option("storage_zone", "waf_storage")
|
||||
|
||||
{{ if $location.LuaRestyWAF.AllowUnknownContent }}
|
||||
waf:set_option("allow_unknown_content_types", true)
|
||||
{{ else }}
|
||||
waf:set_option("allowed_content_types", { "text/html", "text/json", "application/json" })
|
||||
{{ end }}
|
||||
|
||||
waf:set_option("event_log_level", ngx.WARN)
|
||||
|
||||
{{ if gt $location.LuaRestyWAF.Score 0 }}
|
||||
waf:set_option("score_threshold", {{ $location.LuaRestyWAF.Score }})
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.LuaRestyWAF.DisableMultipartBody }}
|
||||
waf:set_option("process_multipart_body", false)
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.LuaRestyWAF.Debug }}
|
||||
waf:set_option("debug", true)
|
||||
waf:set_option("event_log_request_arguments", true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue