Loading…

How we can secure HTTP cookies against XSS attacks?

we have to set flags on the set-cookie HTTP header:

  • HttpOnly
  • secure

After this it will lokk like this : Set-Cookie: sid=; HttpOnly

Point to be noted: Make sure that you go through this twice as this is the favorite node js interview questions for fresher and experienced as well.

Suggest An Answer

No suggestions avaliable!

Latest post from Node js Interview Questions

Ask Question