Is there any way to have middleware for API Routes
As far as I can read from the docs, I can create middleware for server functions, however, it doesn't seem to state anything about API Routes, did I miss it ? Is there any way to create middleware for them ?
4 Replies
afraid-scarlet•9mo ago
this is not supported for API routes
inland-turquoiseOP•9mo ago
Thank you, is there any plan for support ?
afraid-scarlet•9mo ago
hmmm
maybe we find a way to expose server functions as API routes
then this would be solved
extended-salmon•9mo ago
Came looking for this same thing. I see tanstack start as the swiss army knife I can use for my companies going forward. I'm hoping to really push it into fully filling the backend role, but this also means a public api and internal api for mobile applications and some true middleware would be very helpful.