Open ematipico opened 2 days ago
Latest commit: 7af62f72eb90d2aa20ef10923c7ad989b0fb08bd
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Changes
Closes https://github.com/withastro/astro/issues/11306
The issue was caused by
this.status
inside theRenderContext
class. This status code is then passed to theSSResult
and used as initial status ofResponse
.This status code was passed by
route.ts
. It was a 404 because/foo
didn't match any route, however we still call the middleware because the user choserouting: 'manual'
.When we arrived to the middleware, we executed the rewrite, and we need update this status code in case we find a
RouteData
and aComponentInstance
.I moved the shared logic inside a new, private, function called
#executeRewrite
as per @florian-lefebvre suggestion.Testing
Added a new test case
Docs
N/A