Skip to content

Commit

Permalink
Merge pull request #167 from seatsurfing/issue-166
Browse files Browse the repository at this point in the history
Workaround for #166
  • Loading branch information
virtualzone authored Jul 24, 2023
2 parents b547630 + 517aa5b commit 7cc4748
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 7cc4748

Please sign in to comment.