tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
๐
thibault.tngl.sh
5 months ago
0702aa17
408fe501
+5
-1
1 changed file
expand all
collapse all
unified
split
apps
status-page
src
middleware.ts
+5
-1
apps/status-page/src/middleware.ts
···
85
85
}
86
86
87
87
if(_page?.customDomain){
88
88
-
return NextResponse.rewrite(new URL(`/${_page.slug}`, req.url));
88
88
+
if(pathnames.length > 2){
89
89
+
const pathname = pathnames.slice(2).join("/");
90
90
+
return NextResponse.rewrite(new URL(`/${_page.slug}/${pathname}`, req.url));
91
91
+
}
92
92
+
return NextResponse.rewrite(new URL(`/${_page.slug}`, req.url));
89
93
}
90
94
91
95
return response;