-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
nitrojs/nitro
#4108Description
Which project does this relate to?
Start
Describe the bug
Hi,
I'm facing an infinite redirect in Dev and Prod for a specific config of Tanstack Start + Nitro.
The problem occurs when:
- A splat route is used as a proxy, and the URL looks like this:
/subdir/api/proxy/todos/Package.todos.Entity.1 - Vite config is setting a basePath
The config:
const config = defineConfig({
base: "/subdir",
plugins: [
devtools(),
nitro({ baseURL: "/subdir" }),
tsconfigPaths({ projects: ["./tsconfig.json"] }),
tailwindcss(),
tanstackStart(),
viteReact(),
],
});Your Example Website or App
https://github.com/Julienng/tanstack-nitro-basepath-id-with-dots-reproduction-bug
Steps to Reproduce the Bug or Issue
- Go to the index page: http://localhost:3000/subdir/
- Choose one of the 3 detail pages and open
- An infinite redirect occurs, and the error page is shown
- Refresh browser -> the page is shown properly (the page and resource are accessible, but proxy from frontend is bugged)
Expected behavior
The call to /api/proxy/$ should not do an infinite redirect
Screenshots or Videos
Screen.Recording.2026-03-12.at.13.46.33.mov
Platform
- Router Start Version: latest (setted by cli)
- Nitro: 3.0.260311-beta (problem is present in alpha too)
- OS: Macos 26.2
- Browser: Chrome
- Browser Version: 144.0.7559.133
- Bundler: vite
- Bundler Version: ^7.3.1
Additional context
When Nitro is disabled, Tanstack routing is resolving the route correctly
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels