bungle / lua-resty-session

Session library for OpenResty – flexible and secure
BSD 2-Clause "Simplified" License
318 stars 111 forks source link

The session secret and the worker processes #148

Closed kingluo closed 1 year ago

kingluo commented 2 years ago

If session_secret variable is not specified, then it would use a module level generated secret, then if this library is not require in init_by_lua_block, the secrets are different in worker processes, right? If so, two consecutive requests for one session dispatched to different worker processes would failed to decrypt the session data, right? So to make secrets consistent, either setting session_secret variable, or require it in init_by_lua_block, or specifiy it explicitly in opts to open/start, correct?

bungle commented 1 year ago

correct