Move execution of trailingSlash logic after _middleware execution #2338
Closed
andriiradkevych
started this conversation in
Ideas
Replies: 1 comment
-
I'm not sure what the question here is. Why are two redirects a problem? Anyways, two options to avoid an additional redirect:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
_middleware.ts
fresh.config.ts
For navigation to url
/Page
, I've got next redirect path:308 permanent redirect - your redirection for
trailingSlash: true
=>/page
301 - my redirect logic on middleware =>
/page/
it shouldn't be like this , I should have in
/Page
only 1 redirect =>/page/
, and this logic transformation I can do myself ,or there should be next logic . On middleware I can transform url :
without any redirection , and then after middleware you execute trailing slash redirect logic , and I will get only 308 permanent redirect
/page/
or maybe it is possible to make it , like
and you check is url changed by callback , and if so , then do redirect
or just add additional properties pls :
Beta Was this translation helpful? Give feedback.
All reactions