Openstatus www.openstatus.dev

chore: custom domain rewrite (#1393)

* chore: custom subdomain rewrite

* chore: extra safety

authored by

Maximilian Kaske and committed by
GitHub
3ebc0fb4 86f6944b

+12
+12
apps/web/next.config.js
··· 93 93 ], 94 94 destination: "https://:slug.stpg.dev/:path*", 95 95 }, 96 + // Handle custom domains (e.g., status.mxkaske.dev) 97 + { 98 + source: "/:path*", 99 + has: [ 100 + { type: "cookie", key: "sp_mode", value: "new" }, 101 + { 102 + type: "host", 103 + value: "^(?!.*.openstatus.dev$)(?!openstatus.dev$)(?<domain>.+)$", 104 + }, 105 + ], 106 + destination: "https://stpg.dev/:domain/:path*", 107 + }, 96 108 ], 97 109 }; 98 110 },