From 94d4a90bcc0aab03a748bbe539b9179826fea7dd Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 27 Feb 2023 19:35:52 +0800 Subject: [PATCH] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index bc135ac11..c28fda5c5 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -1084,6 +1084,7 @@ end function _M.get_client_ip(self) local client_ip = "unknown" local cdn = auto_config['cdn'] + local request_header = ngx.req.get_headers() if cdn == true then for _,v in ipairs(auto_config['cdn_headers']) do if request_header[v] ~= nil and request_header[v] ~= "" then