Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the nextjs default middleware matcher #1275

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

nikosdouvlis
Copy link
Member

@nikosdouvlis nikosdouvlis commented Jul 17, 2024

Explanation:

For more context, please refer to clerk/javascript#3741

This PR:

  • Updates all instances of the old nextjs matcher with the updated one.

@nikosdouvlis nikosdouvlis requested a review from a team as a code owner July 17, 2024 12:33
Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1275

Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1275

Copy link
Contributor

@jescalan jescalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small things

docs/advanced-usage/satellite-domains.mdx Outdated Show resolved Hide resolved
'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
// Always run for API routes
'/(api|trpc)(.*)',
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to replace with the commented version everywhere? At the moment, we have a commented version explaining the regex in the main docs, but in other places that it's referenced in code examples, we leave out the comments

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quickstart guide didn't have comments before and I guess this is where most people learn about the matcher, that's why I included the comments there. Why woudln't we want the comments everywhere? People would probably just copy and paste the matcher when they find it I guess

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say let's be consistent and keep the comments everywhere - we never know where exactly in the docs someone might be copying and pasting code from and comments don't hurt

'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
// Always run for API routes
'/(api|trpc)(.*)',
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say let's be consistent and keep the comments everywhere - we never know where exactly in the docs someone might be copying and pasting code from and comments don't hurt

@alexisintech alexisintech merged commit 90f9948 into main Jul 22, 2024
4 checks passed
@alexisintech alexisintech deleted the nikos/update-nextjs-matcher branch July 22, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants