img fix
This commit is contained in:
parent
677322db7e
commit
da84f7b968
@ -28,7 +28,7 @@ export default clerkMiddleware(async (auth, req: NextRequest) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const subdomain = getSubdomain(req);
|
const subdomain = getSubdomain(req);
|
||||||
if (subdomain) {
|
if (subdomain && !req.nextUrl.pathname.startsWith("/api")) {
|
||||||
const url = req.nextUrl.clone();
|
const url = req.nextUrl.clone();
|
||||||
url.pathname = `/${subdomain}${url.pathname === "/" ? "" : url.pathname}`;
|
url.pathname = `/${subdomain}${url.pathname === "/" ? "" : url.pathname}`;
|
||||||
return NextResponse.rewrite(url);
|
return NextResponse.rewrite(url);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user