Skip to content

Commit

Permalink
add new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dongs committed Jan 15, 2015
1 parent 8e95e48 commit 52b9d73
Show file tree
Hide file tree
Showing 6 changed files with 1,119 additions and 32 deletions.
4 changes: 4 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module("config")

mode = "enable"

log_pwd = "/var/log/waf/"

couchdb_url = "http://127.0.0.1:5984/"

block_ips = {
"111.111.111.111",
"10.0.2.2",
Expand Down
10 changes: 5 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
config = require("config")
http = require("resty.http")
uuid = require("resty.uuid")
cjson = require("cjson")

log_fd = io.open(config.log_pwd.."waf.log","ab")

dymanic_block_ips_pool = ngx.shared.dymanic_block_ips_pool

function dserror(err)
if err then
ngx.log(ngx.ERR, err)
end
function dslog(...)
ngx.log(ngx.ERR, ...)
end

function split(str, sep)
Expand Down
Loading

0 comments on commit 52b9d73

Please sign in to comment.