mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
* fix: pass pathname to global request middleware in createStartHandler The two `executeMiddleware` calls for global request middleware in `createStartHandler` were missing the `pathname` property, causing it to be `undefined` at runtime despite `RequestServerOptions` declaring it as `pathname: string`. - Add `pathname: url.pathname` to server function middleware execution - Add `pathname: url.pathname` to page request middleware execution The route-level middleware in `handleServerRoutes` already passes `pathname` correctly. Closes TanStack/router#6647 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add regression test for pathname in global request middleware (#6647) Add e2e tests to server-functions-global-middleware verifying that pathname is correctly passed to global request middleware in createStartHandler. - Add pathnameMiddleware that captures pathname from server callback - Add dedicated pathname-middleware route and test page - Verify pathname value on both SSR and client-side navigation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: remove unnecessary `as any` cast from pathname middleware test The middleware type system correctly infers `requestMiddlewarePathname` on the context, so the explicit cast is not needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: apply automated fixes --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| basic | ||
| basic-auth | ||
| basic-cloudflare | ||
| basic-react-query | ||
| basic-rsc | ||
| basic-tsr-config | ||
| clerk-basic | ||
| csp | ||
| css-modules | ||
| custom-basepath | ||
| flamegraph-bench | ||
| i18n-paraglide | ||
| query-integration | ||
| scroll-restoration | ||
| selective-ssr | ||
| serialization-adapters | ||
| server-functions | ||
| server-functions-global-middleware | ||
| server-routes | ||
| server-routes-global-middleware | ||
| spa-mode | ||
| streaming-ssr | ||
| transform-asset-urls | ||
| virtual-routes | ||
| website | ||