|
|
|
|
|
by ljm
458 days ago
|
|
NextJS however is likely constrained by its architecture and the decision to use serverless and edge compute for the backend. Relying on obscure headers for conditional logic this way is certainly one way to avoid bringing in an extra dependency. And the middleware concept itself is fairly primitive compared to what you could do in any server-side API. Arguably, though, the middleware itself is being trusted as the entry-point to the API when it’s barely more than a reverse proxy. It’s not really a vulnerability if you only auth’d the middleware and not your actual routes. |
|