Skip to content

MediumConceptPractical web security

How do you prevent XSS in a full-stack app?

What a good answer covers

Escape or sanitise output by context, use a framework's auto-escaping, avoid raw HTML insertion, set a Content Security Policy and use HttpOnly cookies.

More on Practical web security

Flashcards for this topic