HTTP · Cookies, CORS and security headers

Set a secure session cookie

HttpOnly hides it from JavaScript, Secure restricts it to HTTPS, and SameSite limits cross-site sending.

Set-Cookie: session=abc123; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=3600

Official HTTP documentation

More cookies, cors and security headers commands

All cookies, cors and security headers commands · HTTP cheatsheet

Was this page helpful?