DefineRouteMiddleware should add a Response type #2910
sgalcheung
started this conversation in
Feature Requests
Replies: 1 comment 4 replies
-
Hi @sgalcheung! This is unfortunately not possible — route middleware is not like Astro’s middleware and runs later in the rendering process, so we can’t support features like redirects. For those, an Astro middleware is the right tool. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.32.1
What is your idea?
This should be like with the
defineMiddleware
method.It should be allowed to redirect in some conditions.
Why is this feature necessary?
This should be like with the
defineMiddleware
method.Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions