From fd01486269a2f37b0e11c6ee6b0642529db5f852 Mon Sep 17 00:00:00 2001 From: Kirill Chernakov Date: Sun, 29 Dec 2024 17:44:49 +0400 Subject: [PATCH] chore: add comments --- keep-ui/middleware.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/keep-ui/middleware.ts b/keep-ui/middleware.ts index f121fb4b4..c94140437 100644 --- a/keep-ui/middleware.ts +++ b/keep-ui/middleware.ts @@ -70,7 +70,7 @@ export const middleware = auth(async (request) => { } // Allow all other authenticated requests - console.log("Allowing request to pass through"); + console.log("Allowing request to pass through", request.url); console.log("Request URL: ", request.url); return NextResponse.next({ @@ -84,6 +84,18 @@ export const middleware = auth(async (request) => { // Update the matcher to handle static files and public routes export const config = { matcher: [ + /* + * Match all request paths except for the ones starting with: + * - api (API routes) + * - keep_big.svg (logo) + * - gnip.webp (logo) + * - api/aws-marketplace (aws marketplace) + * - api/auth (auth) + * - monitoring (monitoring) + * - _next/static (static files) + * - _next/image (image optimization files) + * - favicon.ico (favicon file) + */ "/((?!keep_big\\.svg$|gnip\\.webp|api/aws-marketplace$|api/auth|monitoring|_next/static|_next/image|favicon\\.ico).*)", ], };