SameSite=None cookie (ARCH3136)
هذا المحتوى غير متوفر بلغتك بعد.
Key typescript.security.samesite-none-cookie · Severity warning · Category security · CWE CWE-1275
Setting a cookie with SameSite=None but without Secure makes browsers reject it and weakens the CSRF posture.
Incorrect
Section titled “Incorrect”res.cookie("session", token, { sameSite: "none", // secure missing});Correct
Section titled “Correct”res.cookie("session", token, { sameSite: "none", secure: true, httpOnly: true,});Always add the Secure attribute when using SameSite=None; otherwise prefer Lax.