Node.js · Middle · Question 40 of 75
Which cookie attributes help protect a session cookie?
- ✓Correct answer:
HttpOnly,SecureandSameSite - 2
Max-Age=0 - 3
Path=/only
Explanation
HttpOnly hides the cookie from JavaScript (limits XSS damage), Secure sends it only over HTTPS and SameSite helps against CSRF.