Openstatus www.openstatus.dev

fix: www redirect (#1356)

authored by

Maximilian Kaske and committed by
GitHub
74cdb8a2 2e333cff

+10 -1
+9
apps/status-page/next.config.ts
··· 27 27 : "(?<subdomain>[^.]+)\\.localhost", 28 28 }, 29 29 ], 30 + missing: [ 31 + { 32 + type: "host", 33 + value: 34 + process.env.NODE_ENV === "production" 35 + ? "www\\.stpg\\.dev" 36 + : "www\\.localhost", 37 + }, 38 + ], 30 39 destination: "/:subdomain/:path*", 31 40 }, 32 41 ],
+1 -1
apps/status-page/src/middleware.ts
··· 33 33 const _page = await db.select().from(page).where(eq(page.slug, prefix)).get(); 34 34 35 35 if (!_page) { 36 - return NextResponse.redirect(new URL("https://openstatus.dev")); 36 + return NextResponse.redirect(new URL("https://stpg.dev")); 37 37 } 38 38 39 39 if (_page?.passwordProtected) {