Middleware not called for non-custom 404 page #7881
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: error pages
Related to 404 and 500 handling (scope)
feat: middleware
Related to middleware (scope)
What version of
astro
are you using?2.9.6
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Safari
Describe the Bug
When you have
middleware.ts
setup, and a custom 404 page, the middleware will get called when you hit a 404 page. However, if you don't have a custom 404 page but rely on the default, the middleware won't get called.Wondering if this is a deliberate decision?
What's the expected result?
Consistency between the custom and non-custom 404 page. Both should call the middleware.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-pt4enm?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: