SPB Git forge

spb/toveli

Public
14commits 1branches 0releases
1.1 MBsize
maindefault branch
2 h agolast push
TypeScript 50.6% JavaScript 46.1% SQL 2.1% Shell 0.6% CSS 0.5%
479 B · 8 lines typescript
Raw Blame History
1import { NextRequest, NextResponse } from "next/server";2/** Transmet le chemin demandé aux layouts serveur (redirection « next » après connexion) et pose des en-têtes de sécurité de base. */3export function middleware(req: NextRequest) {4  const h = new Headers(req.headers); h.set("x-pathname", req.nextUrl.pathname + req.nextUrl.search);5  return NextResponse.next({ request: { headers: h } });6}7export const config = { matcher: ["/membre/:path*", "/admin/:path*"] };8