xerox-xeon / lua-redis-admin Goto Github PK
View Code? Open in Web Editor NEWRedis client tool, Redis web client, Redis web UI, openresty lor Lua
Redis client tool, Redis web client, Redis web UI, openresty lor Lua
local function check_login()
return function(req, res, next)
local requestPath = req.path
local in_white_list = false
if requestPath == "/auth/login" then
in_white_list = true
end
local islogin, user= is_login(req) --这一段还没登录就去获取session,导致session.lua一直报错
if in_white_list then
next()
else
if islogin then
res.locals.login = islogin
res.locals.username = user and user.username
next()
else
res:redirect("/auth/login")
end
end
end
end
2021/02/26 00:14:43 [error] 1889#0: *1884 [lua] session.lua:85: func(): cannot get session_data:no cookie found in the current request, client: 192.168.0.130, server: 192.168.0.111, request: "POST /auth/login HTTP/1.1", host: "192.168.0.111", referrer: "http://192.168.0.111/auth/login"
2021/02/26 00:14:49 [error] 1889#0: *1884 [lua] session.lua:85: func(): cannot get session_data:no cookie found in the current request, client: 192.168.0.130, server: 192.168.0.111, request: "GET /auth/login HTTP/1.1", host: "192.168.0.111"
2021/02/26 00:14:58 [error] 1889#0: *1888 [lua] session.lua:85: func(): cannot get session_data:no cookie found in the current request, client: 192.168.0.130, server: 192.168.0.111, request: "POST /auth/login HTTP/1.1", host: "192.168.0.111", referrer: "http://192.168.0.111/auth/login"
第一次提issues希望没提错,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.