tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
never going to give up
thibault.tngl.sh
3 months ago
534c9d47
fd441693
+3
-2
1 changed file
expand all
collapse all
unified
split
apps
status-page
src
middleware.ts
+3
-2
apps/status-page/src/middleware.ts
···
42
42
prefix = subdomain.toLowerCase();
43
43
}
44
44
45
45
-
console.log({ pathname: url.pathname, type, prefix });
45
45
+
console.log({ pathname: url.pathname, type, prefix, subdomain });
46
46
47
47
if (url.pathname === "/" && type !== "hostname") {
48
48
return response;
···
137
137
const pathname = pathnames.slice(2).join("/");
138
138
139
139
const rewriteUrl = new URL(
140
140
-
`/${pathname}`,
140
140
+
`${pathname}`,
141
141
`https://${_page.slug}.stpg.dev`,
142
142
);
143
143
console.log({ rewriteUrl });
···
146
146
}
147
147
}
148
148
const rewriteUrl = new URL(`/${_page.slug}`, req.url);
149
149
+
console.log({ rewriteUrl });
149
150
rewriteUrl.search = url.search;
150
151
return NextResponse.rewrite(rewriteUrl);
151
152
}