Closed ematipico closed 4 days ago
Latest commit: ce9b35b82336838cd7620732ecd222a9647b5558
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
This PR hardcodes the status code of the rendered pages
404.astro
and500.astro
.This issue was never evident because users were never able to see/catch the response emitted by these custom pages, but with the rewriting this was evident.
I updated the
renderPage
function to set a differentstatus
in case we attempt to render these particular routes.Testing
Testing here is particularly difficult, because we are inside a rewriting cycle.
I locally tested that in
const response = await next()
the response holds a404
or a500
depending on where we're redirecting.Docs
N/A