Make cookie apply to all subdomains

This commit is contained in:
Thomas Lynch
2022-09-28 00:41:04 +10:00
parent 4716cf1be2
commit b43d207847

View File

@ -267,8 +267,9 @@ function _M.view(applet)
applet:add_header( applet:add_header(
"set-cookie", "set-cookie",
string.format( string.format(
"z_ddos_captcha=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; SameSite=Strict;%s", "z_ddos_captcha=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=.%s; SameSite=Strict;%s",
combined_cookie, combined_cookie,
applet.headers['host'][0],
secure_cookie_flag secure_cookie_flag
) )
) )
@ -312,8 +313,9 @@ function _M.view(applet)
applet:add_header( applet:add_header(
"set-cookie", "set-cookie",
string.format( string.format(
"z_ddos_pow=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; SameSite=Strict;%s", "z_ddos_pow=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=.%s; SameSite=Strict;%s",
combined_cookie, combined_cookie,
applet.headers['host'][0],
secure_cookie_flag secure_cookie_flag
) )
) )