mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
wip: remove starts with function
This commit is contained in:
parent
f519c5f8bf
commit
28d1863be0
1 changed files with 1 additions and 8 deletions
|
|
@ -35,14 +35,7 @@ export default function middleware(req: NextRequest) {
|
|||
return NextResponse.rewrite(url, { headers: { orgslug: currentHost } });
|
||||
}
|
||||
|
||||
if (url.pathname.startsWith("/organizations")) {
|
||||
if (!isSelfHosted) {
|
||||
currentHost = "";
|
||||
}
|
||||
url.pathname = url.pathname.replace("/organizations", `/organizations${currentHost}`).replace("localhost:3000", "");
|
||||
|
||||
return NextResponse.rewrite(url);
|
||||
}
|
||||
|
||||
|
||||
if (isSelfHosted) {
|
||||
currentHost = defaultOrg || currentHost;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue