mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
bugfix: links issue
This commit is contained in:
parent
db4c0b91c4
commit
7b0c90ce06
2 changed files with 10 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue