Skip to content

Commit 938f7a5

Browse files
authored
Update links to migration guide
Co-authored-by: Alexis Aguilar <[email protected]>
1 parent 04f783c commit 938f7a5

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.changeset/nextjs-deprecate-route-matcher.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Deprecate `createRouteMatcher()` in favor of resource-based auth checks.
77
Middleware-based auth checks rely on path matching, which can diverge from how Next.js routes requests and leave protected resources reachable.
88

99
For a migration guide, see:
10-
https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrating-from-create-route-matcher
10+
https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrate-from-create-route-matcher
1111

1212
Instead of protecting routes from middleware, move auth checks into each protected page, layout, API route, or Server Function, for example:
1313

‎packages/nextjs/src/server/__tests__/routeMatcher.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('createRouteMatcher', () => {
2020

2121
expect(mockDeprecated).toHaveBeenCalledWith(
2222
'createRouteMatcher',
23-
'Use resource-based auth checks instead. Move auth checks into each page, layout, API route, or Server Function that accesses protected data. Middleware-based auth checks rely on path matching, which can diverge from how Next.js routes requests and leave protected resources reachable. For a migration guide, see: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrating-from-create-route-matcher',
23+
'Use resource-based auth checks instead. Move auth checks into each page, layout, API route, or Server Function that accesses protected data. Middleware-based auth checks rely on path matching, which can diverge from how Next.js routes requests and leave protected resources reachable. For a migration guide, see: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrate-from-create-route-matcher',
2424
);
2525
});
2626
});

‎packages/nextjs/src/server/routeMatcher.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export type RouteMatcherParam =
2727
* leave protected resources reachable.
2828
*
2929
* For a migration guide, see:
30-
* https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrating-from-create-route-matcher
30+
* https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrate-from-create-route-matcher
3131
*/
3232
export const createRouteMatcher = (routes: RouteMatcherParam) => {
3333
deprecated(
3434
'createRouteMatcher',
35-
'Use resource-based auth checks instead. Move auth checks into each page, layout, API route, or Server Function that accesses protected data. Middleware-based auth checks rely on path matching, which can diverge from how Next.js routes requests and leave protected resources reachable. For a migration guide, see: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrating-from-create-route-matcher',
35+
'Use resource-based auth checks instead. Move auth checks into each page, layout, API route, or Server Function that accesses protected data. Middleware-based auth checks rely on path matching, which can diverge from how Next.js routes requests and leave protected resources reachable. For a migration guide, see: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/migrate-from-create-route-matcher',
3636
);
3737
if (typeof routes === 'function') {
3838
return (req: NextRequest) => routes(req);

0 commit comments

Comments
 (0)