mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-22 13:38:38 +00:00
update Separate internal to it's own route file
This commit is contained in:
+2
-3
@@ -18,7 +18,7 @@ export async function middleware(req: NextRequest) {
|
|||||||
`
|
`
|
||||||
.replace(/\s+/g, " ")
|
.replace(/\s+/g, " ")
|
||||||
.trim();
|
.trim();
|
||||||
if (pathname.startsWith("/_/embed/")) {
|
if (pathname.startsWith("/ngdi-internal/embed/")) {
|
||||||
headers.set("Content-Security-Policy", cspHeader);
|
headers.set("Content-Security-Policy", cspHeader);
|
||||||
headers.set("X-Frame-Options", "ALLOWALL");
|
headers.set("X-Frame-Options", "ALLOWALL");
|
||||||
headers.set("X-Content-Type-Options", "nosniff");
|
headers.set("X-Content-Type-Options", "nosniff");
|
||||||
@@ -31,7 +31,7 @@ export async function middleware(req: NextRequest) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
response.headers.set("X-Pathname", req.nextUrl.pathname);
|
response.headers.set("X-Pathname", req.nextUrl.pathname);
|
||||||
if (pathname.startsWith("/_/embed/")) {
|
if (pathname.startsWith("/ngdi-internal/embed/")) {
|
||||||
response.headers.set("Content-Security-Policy", cspHeader);
|
response.headers.set("Content-Security-Policy", cspHeader);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,6 @@ export async function middleware(req: NextRequest) {
|
|||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: ["/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)"],
|
matcher: ["/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)"],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user