Skip to content

Commit

Permalink
Update site/src/middleware/redirectToMainHost.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Obermair <[email protected]>
  • Loading branch information
fraxachun and johnnyomair authored Feb 12, 2025
1 parent 51a3196 commit fac9e25
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions site/src/middleware/redirectToMainHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@ export function withRedirectToMainHostMiddleware(middleware: CustomMiddleware) {
return NextResponse.redirect(redirectSiteConfig.url);
}

const response = new NextResponse(
'<!DOCTYPE html><html lang="en"><head><meta charset=utf-8><title>404</title></head><body>Cannot resolve domain</body></html>',
{
status: 404,
},
);
response.headers.set("Content-Type", "text/html; charset=utf-8");
return response;
return NextResponse.json({ error: "Cannot resolve domain" }, { status: 404 })

Check failure on line 26 in site/src/middleware/redirectToMainHost.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `;`
}
return middleware(request);
};
Expand Down

0 comments on commit fac9e25

Please sign in to comment.