Merge pull request #3187 from DesmondHoLLM/feature/annotations-resty-lua
UPT: annotation enhancement for resty-lua-waf
This commit is contained in:
commit
063f652711
5 changed files with 156 additions and 17 deletions
|
|
@ -891,9 +891,23 @@ stream {
|
|||
|
||||
waf:set_option("mode", "{{ $location.LuaRestyWAF.Mode }}")
|
||||
waf:set_option("storage_zone", "waf_storage")
|
||||
|
||||
{{ if $location.LuaRestyWAF.AllowUnknownContentTypes }}
|
||||
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.ScoreThreshold 0 }}
|
||||
waf:set_option("score_threshold", {{ $location.LuaRestyWAF.ScoreThreshold }})
|
||||
{{ end }}
|
||||
|
||||
{{ if not $location.LuaRestyWAF.ProcessMultipartBody }}
|
||||
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