Openstatus www.openstatus.dev

chore: more logs

+6
+6
apps/status-page/src/middleware.ts
··· 31 31 type = "pathname"; 32 32 } 33 33 34 + console.log({ pathname: url.pathname, type }); 35 + 34 36 if (url.pathname === "/" && type !== "hostname") { 35 37 return response; 36 38 } ··· 42 44 sql`lower(${page.slug}) = ${prefix} OR lower(${page.customDomain}) = ${prefix}`, 43 45 ) 44 46 .get(); 47 + 48 + console.log({ slug: _page?.slug, customDomain: _page?.customDomain }); 45 49 46 50 if (!_page) { 47 51 // return NextResponse.redirect(new URL("https://stpg.dev")); ··· 74 78 } 75 79 76 80 const proxy = req.headers.get("x-proxy"); 81 + console.log({ proxy }); 82 + 77 83 if (proxy) { 78 84 return NextResponse.rewrite(new URL(`/${prefix}${url.pathname}`, req.url)); 79 85 }