更新 target/fwutils/request_config.lua

This commit is contained in:
2026-03-12 19:02:47 +08:00
parent f8503964b0
commit 3112537fd6

View File

@@ -29,8 +29,15 @@ M.init = function(website_config)
if M.__url_param ~= nil then
M.__action = M.__url_param["action"]
end
-- 获取TOKEN
-- 获取TOKEN
local token = string.match(request.header("Cookie"),"token=(%w+)")
if token == nil or token == "" then
token = M.__url_param["token"]
if token ~= nil then
response.header("Set-Cookie","token="..token..";Path=/")
end
end
if token ~= nil and token ~= "" then
local result,user_data = token_module.get(token)
-- print("TOKEN_DATA:",cjson.encode(user_data))