Openstatus www.openstatus.dev

chore: custom domain rewrite

+4 -1
+3
apps/status-page/src/middleware.ts
··· 16 16 17 17 const hostnames = host?.split(/[.:]/) ?? url.host.split(/[.:]/); 18 18 const pathnames = url.pathname.split("/"); 19 + 20 + console.log({ hostnames, pathnames }); 21 + 19 22 if ( 20 23 hostnames.length > 2 && 21 24 hostnames[0] !== "www" &&
+1 -1
apps/web/next.config.js
··· 104 104 "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)(?<domain>.+)$", 105 105 }, 106 106 ], 107 - destination: "https://www.stpg.dev/:path*", 107 + destination: "https://www.stpg.dev/:domain/:path*", 108 108 }, 109 109 ], 110 110 };