Skip to content
Discussion options

You must be logged in to vote
export const config = {
  matcher: [
    "/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|.*\\.[^/]+$).*)",
  ],
}

.*\\.[^/]+$ is a regex that matches anything with a file extension (e.g., .jpg, .png, .css, .woff2, .webmanifest, etc.).

Replies: 3 comments 22 replies

Comment options

You must be logged in to vote
17 replies
@devdogfish
Comment options

@icyJoseph
Comment options

@devdogfish
Comment options

@PALLAVIKHEDLE
Comment options

Answer selected by devdogfish
@PALLAVIKHEDLE
Comment options

Comment options

You must be logged in to vote
1 reply
@devdogfish
Comment options

Comment options

You must be logged in to vote
4 replies
@icyJoseph
Comment options

@PALLAVIKHEDLE
Comment options

@devdogfish
Comment options

@Ren-Logronio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants