bunkerweb 1.4.0

This commit is contained in:
bunkerity
2022-06-03 17:24:14 +02:00
parent 3a078326c5
commit a9f886804a
5245 changed files with 1432051 additions and 27894 deletions

View File

@@ -0,0 +1,13 @@
local tonumber = tonumber
local random = require "resty.random".bytes
local var = ngx.var
local defaults = {
length = tonumber(var.session_random_length, 10) or 16
}
return function(session)
local config = session.random or defaults
local length = tonumber(config.length, 10) or defaults.length
return random(length, true) or random(length)
end