summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <ematipico@users.noreply.github.com> 2025-03-19 12:30:19 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2025-03-19 12:30:19 +0000
commit53abc9d4c8a63a4cfb4c682ed8a3e265cc87561e (patch)
tree442b8338005b28876f3c0c4cf8ad748e8a61a2ad
parentd80ba2b27d33d2972ffa3242330fb00d0fc58ba9 (diff)
downloadastro-53abc9d4c8a63a4cfb4c682ed8a3e265cc87561e.tar.gz
astro-53abc9d4c8a63a4cfb4c682ed8a3e265cc87561e.tar.zst
astro-53abc9d4c8a63a4cfb4c682ed8a3e265cc87561e.zip
[ci] format
-rw-r--r--packages/astro/src/core/app/index.ts18
-rw-r--r--packages/astro/src/vite-plugin-astro-server/response.ts6
2 files changed, 18 insertions, 6 deletions
diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts
index 51d4e4c2f..36560478e 100644
--- a/packages/astro/src/core/app/index.ts
+++ b/packages/astro/src/core/app/index.ts
@@ -290,12 +290,20 @@ export class App {
if (redirect !== url.pathname) {
const status = request.method === 'GET' ? 301 : 308;
- return new Response(redirectTemplate({ status, relativeLocation: url.pathname, absoluteLocation: redirect, from: request.url }), {
- status,
- headers: {
- location: redirect + url.search,
+ return new Response(
+ redirectTemplate({
+ status,
+ relativeLocation: url.pathname,
+ absoluteLocation: redirect,
+ from: request.url,
+ }),
+ {
+ status,
+ headers: {
+ location: redirect + url.search,
+ },
},
- });
+ );
}
addCookieHeader = renderOptions?.addCookieHeader;
diff --git a/packages/astro/src/vite-plugin-astro-server/response.ts b/packages/astro/src/vite-plugin-astro-server/response.ts
index b265312e9..ac7883c60 100644
--- a/packages/astro/src/vite-plugin-astro-server/response.ts
+++ b/packages/astro/src/vite-plugin-astro-server/response.ts
@@ -59,7 +59,11 @@ export function writeRedirectResponse(
statusCode: number,
location: string,
) {
- const html = redirectTemplate({ status: statusCode, absoluteLocation: location, relativeLocation: location });
+ const html = redirectTemplate({
+ status: statusCode,
+ absoluteLocation: location,
+ relativeLocation: location,
+ });
res.writeHead(statusCode, {
Location: location,
'Content-Type': 'text/html',