Premier commit de la v2 de l'app

This commit is contained in:
UltraLionFr
2025-07-29 05:15:33 +02:00
parent 2f14898357
commit b593c60ab2
67 changed files with 5003 additions and 388 deletions
+23
View File
@@ -0,0 +1,23 @@
import { auth } from "@/auth";
import { NextResponse } from "next/server";
export default auth((req) => {
const { pathname } = req.nextUrl;
if (pathname.startsWith("/dashboard") && !req.auth) {
return Response.redirect(
new URL("/api/auth/signin?callbackUrl=/dashboard", req.url)
);
}
const res = NextResponse.next();
res.headers.set("X-Frame-Options", "DENY");
res.headers.set("Content-Security-Policy", "frame-ancestors 'none';");
return res;
});
export const config = {
matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
};