body_filter_by_lua_block nginx lua -
the code below nginx lua:
body_filter_by_lua_block { function check_access_file(file) local fh = io.open(file,'rb') if fh fh:close() return true else return false end return false end function write_file(file, str) local check_access_file = check_access_file(file) if check_access_file local fh = io.open(file, "a") fh:write(str, "\n") fh:close() end end write_file('/etc/nginx/111', '1234567='..ngx.arg[1]) }
when run once, 2 replies written file
1234567 = test 1234567 =
why each request 2 responses written file 111?
Comments
Post a Comment