tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
ok now?
thibault.tngl.sh
3 months ago
b0d1ed66
485430ba
+2
-2
1 changed file
expand all
collapse all
unified
split
apps
status-page
src
middleware.ts
+2
-2
apps/status-page/src/middleware.ts
···
123
123
}
124
124
125
125
console.log({customDomain: _page.customDomain, host, expectedHost: `${_page.slug}.stpg.dev`})
126
126
-
if (_page.customDomain && url.host !== `${_page.slug}.stpg.dev`) {
126
126
+
if (_page.customDomain && host !== `${_page.slug}.stpg.dev`) {
127
127
if (pathnames.length > 2 && !subdomain) {
128
128
const pathname = pathnames.slice(2).join("/");
129
129
const rewriteUrl = new URL(`/${_page.slug}/${pathname}`, req.url);
···
135
135
// const vercelURL = process.env.VERCEL_URL || "www.stpg.dev";
136
136
// console.log({newUrl: vercelURL})
137
137
if (pathnames.length > 2) {
138
138
-
const pathname = pathnames.slice(2).join("/");
138
138
+
const pathname = pathnames.slice(1).join("/");
139
139
140
140
const rewriteUrl = new URL(
141
141
`${pathname}`,