mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
samesite strict and secure in hcaptcha script set-cookie
This commit is contained in:
@ -124,7 +124,7 @@ function _M.view(applet)
|
|||||||
local floating_hash = utils.generate_secret(applet, hcaptcha_cookie_secret, true, nil)
|
local floating_hash = utils.generate_secret(applet, hcaptcha_cookie_secret, true, nil)
|
||||||
applet:add_header(
|
applet:add_header(
|
||||||
"set-cookie",
|
"set-cookie",
|
||||||
string.format("z_ddos_captcha=%s; expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/", floating_hash)
|
string.format("z_ddos_captcha=%s; expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; SameSite=Strict; Secure=true;", floating_hash)
|
||||||
)
|
)
|
||||||
-- else
|
-- else
|
||||||
-- core.Debug("HCAPTCHA FAILED: " .. json.encode(api_response))
|
-- core.Debug("HCAPTCHA FAILED: " .. json.encode(api_response))
|
||||||
|
Reference in New Issue
Block a user