We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a295913 commit 1a7409eCopy full SHA for 1a7409e
site/src/middleware/redirectToMainHost.ts
@@ -23,7 +23,14 @@ export function withRedirectToMainHostMiddleware(middleware: CustomMiddleware) {
23
return NextResponse.redirect(redirectSiteConfig.url);
24
}
25
26
- return new NextResponse(null, { status: 404 });
+ const response = new NextResponse(
27
+ '<!DOCTYPE html><html lang="en"><head><meta charset=utf-8><title>404</title></head><body>Cannot resolve domain</body></html>',
28
+ {
29
+ status: 404,
30
+ },
31
+ );
32
+ response.headers.set("Content-Type", "text/html; charset=utf-8");
33
+ return response;
34
35
return middleware(request);
36
};
0 commit comments