When I first learned about CORS, I had trouble understanding it because I couldn't figure out how this protected the server and I couldn't understand why you would do this just for the client 😄
post
there doesn't seem to be anything here
9 comments in c/programming@programming.dev view that post
One thing to note, CORS only makes sense if your API uses cookies for authentication, most APIs use custom headers, the Authentication header, or even url tokens, they don't rely on cookies, so most of the time, APIs don't care about CORS. People keep blindly repeating that accepting all origins "*", is bad for security, but the situations where this is relevant are really uncommon.
replies:
Absolutely NOTHING! Good God, y'all.
replies:
permalink
fedilink
source
parent
hideshow 2 child comments
I get the reference
replies:
permalink
fedilink
source
parent
hideshow 1 child comment
Enlighten me
no comments (yet)