
2025-06-02 18:49:53
CORS - Cruel Ordeal of Relentless Suffering #web #development #wrongAnswers
CORS - Cruel Ordeal of Relentless Suffering #web #development #wrongAnswers
Day 18
Today I debugged an issue with accessing backend endpoints from a Next.js frontend talking to a NestJS API.
The browser was blocking requests due to a CORS error — the Authorization header was not allowed in the preflight response. Even though frontend domains were correctly set, I forgot to include Authorization in allowedHeaders.
After updating enableCors() to:
`allowedHeaders: 'Authorization, Content-Type, Accept'`
…the issue disappeared, and t…
🔥 Hot take, but managing middleware order in #aspnetcore is busted.
It would be nice if there were less granularity and more “when you add this, it's going to register in the right place every time”.
Case in point:
A decisive Theorem (Un th\'eor\`eme d\'ecisif)
Henri Lombardi
https://arxiv.org/abs/2506.07098 https://arxiv.org/pdf/2506.070…