Skip to content

Commit

Permalink
Workaround for #166
Browse files Browse the repository at this point in the history
  • Loading branch information
virtualzone committed Jul 24, 2023
1 parent b547630 commit 517aa5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin-ui/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function middleware(req: NextRequest) {
return NextResponse.redirect(
new URL(
`/admin/${locale}${req.nextUrl.pathname}${req.nextUrl.search}`,
req.url,
"http://localhost:3000", // https://github.com/seatsurfing/backend/issues/166
),
);
}
Expand Down
4 changes: 2 additions & 2 deletions booking-ui/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export async function middleware(req: NextRequest) {

if (req.nextUrl.locale === 'default') {
const locale = req.cookies.get('NEXT_LOCALE')?.value || 'en';

return NextResponse.redirect(
new URL(
`/ui/${locale}${req.nextUrl.pathname}${req.nextUrl.search}`,
req.url,
"http://localhost:3001", // https://github.com/seatsurfing/backend/issues/166
),
);
}
Expand Down

0 comments on commit 517aa5b

Please sign in to comment.