[BUG] trailingSlash redirecting doesn't work (app-router
-e2e)
#312
Labels
bug
Something isn't working
app-router
-e2e)
#312
Describe the bug
By default Next.js will redirect URLs with trailing slashes to their counterpart without a trailing slash (Next.js docs) this however doesn't seem to happen in built-applications
Steps to reproduce
In any application using the adapter, start the
next dev
server and navigate to any of the application's route, but with an added trailing slash (e.g.http://localhost:3000/api/hello/
) notice that the browser got redirected to the route without the trailing slash (e.g.http://localhost:3000/api/hello
)Now build the application using the adapter and preview the application via
wrangler dev
, following the process above will show that in such case the redirection does not happen (e.g. you navigate tohttp://localhost:8770/api/hello/
that route is served without being redirected tohttp://localhost:8770/api/hello
)Expected behavior
URLs ending with
/
should be redirected to their counterpart without the/
, unlesstrailingSlash
is set totrue
in the Next.js config file, in that case the opposite should happen (routes not ending with/
should be redirected to ones ending with it)@opennextjs/cloudflare version
0.4.3
Wrangler version
3.107.0
next info output
Additional context
No response
The text was updated successfully, but these errors were encountered: