This issue was created by an agent auditing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-06-08).
Problem
The trailingSlash config is not applied to App Router route handlers (app/**/route.ts). Both the edge and node runtime variants fail.
Affected Test Suites
test/e2e/app-dir/app-routes-trailing-slash/app-routes-trailing-slash.test.ts (2 failures)
- should handle trailing slash for edge runtime
- should handle trailing slash for node runtime
Estimated impact
~2 e2e failures.
Notes
The closed #1332 covered trailingSlash for pages/app pages; this is the route-handler path, which is currently untracked.
Recommendation
- Reproduce: an
app/api/foo/route.ts with trailingSlash: true and assert /api/foo redirects to /api/foo/ (and vice-versa for false), for both runtimes.
- Apply the trailing-slash normalization/redirect to the route-handler dispatch path, not just page rendering.
Problem
The
trailingSlashconfig is not applied to App Router route handlers (app/**/route.ts). Both the edge and node runtime variants fail.Affected Test Suites
test/e2e/app-dir/app-routes-trailing-slash/app-routes-trailing-slash.test.ts(2 failures)Estimated impact
~2 e2e failures.
Notes
The closed #1332 covered
trailingSlashfor pages/app pages; this is the route-handler path, which is currently untracked.Recommendation
app/api/foo/route.tswithtrailingSlash: trueand assert/api/fooredirects to/api/foo/(and vice-versa forfalse), for both runtimes.