You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Start: global request middleware is executed multiple times for single request #5239
Based on my experience it's not even related to global middleware or request middleware. Even standard server function middleware is called two times during single server function call.
What I noticed additionally is that it only happens during SSR request. When server function is called from client, middleware is correctly called only once.
Adding following code to app created using npm create @tanstack/start@latest:
Activity
wand3r commentedon Oct 5, 2025
Based on my experience it's not even related to global middleware or request middleware. Even standard server function middleware is called two times during single server function call.
What I noticed additionally is that it only happens during SSR request. When server function is called from client, middleware is correctly called only once.
Adding following code to app created using
npm create @tanstack/start@latest:causes following output during SSR
and during client navigation