update condition for production redirect
This commit is contained in:
@@ -182,7 +182,11 @@ function getPatterns() {
|
||||
return NextResponse.redirect(
|
||||
new URL(pathsConfig.app.home, req.nextUrl.origin).href,
|
||||
);
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
} else if (
|
||||
!['test', 'localhost'].some((pathString) =>
|
||||
process.env.NEXT_PUBLIC_SITE_URL?.includes(pathString),
|
||||
)
|
||||
) {
|
||||
return NextResponse.redirect(
|
||||
new URL('https://medreport.ee', req.nextUrl.origin).href,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user