网站统计记录POST请求原文优化

This commit is contained in:
midoks
2022-11-29 02:58:52 +08:00
parent ae371be91a
commit 82dd2553e6
5 changed files with 65 additions and 7 deletions
+4
View File
@@ -76,6 +76,10 @@ function _M.getTotalKey(self)
return self.total_key
end
function _M.to_json(self, msg)
return json.encode(msg)
end
function _M.setConfData( self, config, site_config )
self.config = config
self.site_config = site_config
+1 -2
View File
@@ -373,8 +373,7 @@ log_by_lua_block {
local client_stat_fields = {}
if not excluded then
if status_code == 500 or (method=="POST" and config["record_post_args"] == true) or (status_code==403 and config["record_get_403_args"] == true) then
if status_code == 500 or (method=="POST" and config['global']["record_post_args"] == true) or (status_code==403 and config['global']["record_get_403_args"] == true) then
local data = ""
local ok, err = pcall(function() data = C:get_http_origin() end)
if ok and not err then