doesitarm/src/pages/[...page].astro
2022-05-04 13:58:26 -05:00

28 lines
716 B
Text

---
// import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
import { catchRedirectResponse } from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
// Component Script:
// You can write any JavaScript/TypeScript that you'd like here.
// It will run during the build, but never in the browser.
// All variables are available to use in the HTML template below.
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
const redirectResponse = await catchRedirectResponse( Astro )
if ( redirectResponse !== null ) {
return redirectResponse
}
// Not found
return new Response(null, {
status: 404,
statusText: 'Not found'
})
---
404