fix: sw.js not found on subdomain
This commit is contained in:
parent
8adddc06c9
commit
0b3bcd1aa1
|
|
@ -47,7 +47,9 @@ export default async function middleware(req: NextRequest) {
|
|||
|
||||
if (tenant) {
|
||||
const url = req.nextUrl.clone()
|
||||
url.pathname = `/_site/${tenant}${url.pathname}`
|
||||
if (url.pathname !== "/ipfs-gateway-sw.js") {
|
||||
url.pathname = `/_site/${tenant}${url.pathname}`
|
||||
}
|
||||
return NextResponse.rewrite(url)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue