diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index c09f12fca..1abaa11b8 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -201,7 +201,7 @@ end function _M.get_http_origin(self) local data = "" - local headers = ngx_req.get_headers() + local headers = ngx.req.get_headers() if not headers then return data end if method ~='GET' then ngx.req.read_body()