All jobs / Backend developer / Security

Backend developer interview question · 1–3 years

The interviewer asks: “We set CORS to our frontend origin. Are we safe?” Strongest answer?

The strongest answer

CORS is a browser rule about who can read a response. It is not authentication or authorization. curl, mobile apps and servers ignore it. I still auth every request.

Why it works

Exactly. A missing CORS header stops a browser page, not an attacker. Authz is still the API's job.

What a good answer covers

Answers that fall short

Who gets asked this

More Security questions