mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
CodeQL go/cookie-secure-not-set (CWE-614) flagged the nz-csrf cookie as missing the Secure attribute. Mirror writeOauth2StateCookie and derive Secure from the request scheme instead of hardcoding it: forcing Secure=true would make browsers drop the cookie on plain-HTTP intranet deployments, breaking the double-submit CSRF pair and 403-ing every unsafe request.