-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmiddleware.ts
More file actions
27 lines (23 loc) · 865 Bytes
/
middleware.ts
File metadata and controls
27 lines (23 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { NextResponse, type NextRequest } from "next/server";
export async function middleware(request: NextRequest) {
let response = NextResponse.next({
request: {
headers: request.headers,
},
});
// Middleware artık sadece gelecekte korumalı rotalar için bir yapı sağlıyor
// Şu anda aktif bir koruma işlemi yapmıyor
// İhtiyaç duyduğunuzda, kendi kimlik doğrulama sisteminizi ekleyebilirsiniz
return response;
}
export const config = {
matcher: [
/*
* Match all internal paths:
* - Except /api routes (API routes)
* Except for /_next/static, /_next/image paths (Next.js internal paths)
* Excluding root files like /favicon.ico, /icon.png, /apple-icon.png, /sitemap.xml, etc.
*/
"/((?!api|_next/static|_next/image|favicon.ico|icon.ico|icon.png|apple-icon.png|sitemap.xml).*)",
],
};