bugfix: links issue

This commit is contained in:
swve 2023-02-13 23:01:59 +01:00
parent db4c0b91c4
commit 7b0c90ce06
2 changed files with 10 additions and 8 deletions

View file

@ -36,7 +36,7 @@ export default function middleware(req: NextRequest) {
// if url starts with "/organizations" rewrite to path
if (url.pathname.startsWith("/organizations")) {
url.pathname = url.pathname.replace("/organizations", `/organizations/${currentHost}`);
url.pathname = url.pathname.replace("/organizations", `/organizations${currentHost}`);
// remove localhost:3000 from url
url.pathname = url.pathname.replace(`localhost:3000`, "");
console.log(url);