Git Product home page Git Product logo

lua-redis-admin's People

Contributors

lifeblood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lua-redis-admin's Issues

登录接口session模块在get和post的时候一直报错

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希望没提错,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.