Skip to content

Open-source status page, incident response and uptime monitoring

😂

Thibault Le Ouayf216b94ca92b
diff --git a/apps/status-page/src/middleware.ts b/apps/status-page/src/middleware.ts
index 3f91ea615..cc4b8c524 100644
--- a/apps/status-page/src/middleware.ts
+++ b/apps/status-page/src/middleware.ts
@@ -88,7 +88,7 @@ export default async function middleware(req: NextRequest) {
// WTF is this
if (_page.customDomain === prefix && pathnames[1] === pathnames[2]) {
- const newPathname = `/${pathnames.slice(2).join("/")}`;
+ const newPathname = `/${pathnames.slice(0,1).join("/")}`;
return NextResponse.rewrite(new URL(newPathname, req.url));
}
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 5c868c5d2..cd63d9df7 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -94,18 +94,6 @@ const nextConfig = {
destination: "https://:slug.stpg.dev/:path*",
},
// Handle custom domains (e.g., status.mxkaske.dev)
- {
- source: "/status-page/:path*",
- has: [
- { type: "cookie", key: "sp_mode", value: "new" },
- {
- type: "host",
- value:
- "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)$",
- },
- ],
- destination: "https://www.stpg.dev/:path*",
- },
{
source: "/:path*",
has: [
@@ -113,7 +101,7 @@ const nextConfig = {
{
type: "host",
value:
- "^(?<domain>.+)$",
+ "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)(?<domain>.+)$",
},
],
destination: "https://www.stpg.dev/:domain/:path*",