mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Don't regenerate srvkey at reloading
This commit is contained in:
parent
1788a72e88
commit
89be69b1e6
2 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
-- Load configuration
|
||||
--
|
||||
cache = ngx.shared.cache
|
||||
srvkey = cache:get("srvkey")
|
||||
oneweek = 60 * 60 * 24 * 7
|
||||
cookies = {}
|
||||
local conf_file = assert(io.open(conf_path, "r"), "Configuration file is missing")
|
||||
|
|
4
init.lua
4
init.lua
|
@ -12,7 +12,7 @@ hige = require "hige"
|
|||
|
||||
-- Set random key
|
||||
math.randomseed(os.time())
|
||||
srvkey = math.random(1111111, 9999999)
|
||||
ngx.shared.cache:add("srvkey", math.random(1111111, 9999999))
|
||||
|
||||
-- Shared table
|
||||
flashs = {}
|
||||
|
@ -20,6 +20,6 @@ login = {}
|
|||
logout = {}
|
||||
|
||||
-- Path of the configuration
|
||||
conf_path = '/etc/ssowat/conf.json'
|
||||
conf_path = "/etc/ssowat/conf.json"
|
||||
|
||||
ngx.log(ngx.INFO, "SSOwat ready")
|
||||
|
|
Loading…
Add table
Reference in a new issue