diff --git a/packages/astro/src/core/render/result.ts b/packages/astro/src/core/render/result.ts index 6b9bda52c..342c7fbd8 100644 --- a/packages/astro/src/core/render/result.ts +++ b/packages/astro/src/core/render/result.ts @@ -194,13 +194,13 @@ export function createResult(args: CreateResultArgs): SSRResult { url, redirect: args.ssr ? (path, status) => { - return new Response(null, { - status: status || 302, - headers: { - Location: path, - }, - }); - } + return new Response(null, { + status: status || 302, + headers: { + Location: path, + }, + }); + } : onlyAvailableInSSR('Astro.redirect'), resolve(path: string) { let extra = `This can be replaced with a dynamic import like so: await import("${path}")`;