summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/dev.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/astro/src/dev.ts b/packages/astro/src/dev.ts
index a7da0c863..4321adfaa 100644
--- a/packages/astro/src/dev.ts
+++ b/packages/astro/src/dev.ts
@@ -47,6 +47,13 @@ export default async function dev(astroConfig: AstroConfig) {
res.end();
break;
}
+ case 301:
+ case 302: {
+ res.statusCode = result.statusCode;
+ res.setHeader('Location', result.location);
+ res.end();
+ break;
+ }
case 404: {
const fullurl = new URL(req.url || '/', astroConfig.buildOptions.site || `http://localhost${astroConfig.devOptions.port}`);
const reqPath = decodeURI(fullurl.pathname);