diff --git a/dist.ini b/dist.ini index 0683b5b..7cae854 100644 --- a/dist.ini +++ b/dist.ini @@ -7,6 +7,6 @@ lib_dir = lib doc_dir = lib repo_link = https://github.com/potats0/lua-resty-coraza main_module = lib/resty/coraza.lua -version = "1.0.1" +version = 1.0.1 requires = luajit exclude_files=*.rockspec \ No newline at end of file diff --git a/lua-resty-coraza-1.0.0-0.rockspec b/lua-resty-coraza-1.0.0-0.rockspec index 893c678..585963a 100644 --- a/lua-resty-coraza-1.0.0-0.rockspec +++ b/lua-resty-coraza-1.0.0-0.rockspec @@ -1,8 +1,8 @@ package = "lua-resty-coraza" -version = "1.0.0-0" +version = "1.0.1-0" source = { url = "https://github.com/potats0/lua-resty-coraza", - tag = "v1.0.0" + tag = "v1.0.1" } description = { diff --git a/lua-resty-coraza-1.0.0/README.md b/lua-resty-coraza-1.0.0/README.md deleted file mode 100644 index 05b6c88..0000000 --- a/lua-resty-coraza-1.0.0/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# lua-resty-coraza - -## Name - -Lua implementation of the [libcoraza](https://github.com/corazawaf/libcoraza) for modsecurity Web Application Firewall. - - -## Installation - -```bash -luarocks install lua-resty-t1k -``` - -## Synopsis - -```lua - -init_worker_by_lua_block{ - coraza = require "resty.coraza" - waf = coraza.create_waf() - -- add rule from file - coraza.rules_add_file(waf, "%s/t/coraza.conf") - - -- your corerule set, add rule from directive - coraza.rules_add(waf, "Include %s/t/coreruleset/crs-setup.conf.example") - coraza.rules_add(waf, "Include %s/t/coreruleset/rules/*.conf") -} - -location /t { - access_by_lua_block { - coraza.do_create_transaction(waf) - coraza.do_access_filter() - coraza.do_interrupt() - } - - content_by_lua_block { - ngx.say("passed") - } - - header_filter_by_lua_block{ - coraza.do_header_filter() - coraza.do_interrupt() - } - - log_by_lua_block{ - coraza.do_log() - coraza.do_free_transaction() - } -} -``` - -if you need more log for debug, please turn on the debug on nginx. - -``` -error_log logs/error.log debug; -``` \ No newline at end of file