• Tutorials
  • Courses
  • Tracks

A cookie-based web app receives POSTs from another origin. What’s the most appropriate protection?

Last Updated :
Discuss
Comments

A cookie-based web app receives POSTs from another origin. What’s the most appropriate protection?

Enable Access-Control-Allow-Origin: *

Rely on CORS preflight alone

Use framework CSRF tokens (per-form) and validate Origin/Referer

Set SameSite=None on cookies to simplify cross-site requests

Share your thoughts in the comments