Skip to content

Commit ff225e4

Browse files
authored
Merge pull request #1960 from cprussin/fix-middleware-regex
fix(staking): fix middleware matcher regex
2 parents adb6b8b + d0fbce5 commit ff225e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/staking/src/middleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,8 @@ const isBlockedSegment = ({ nextUrl: { pathname } }: NextRequest) =>
4747
pathname.startsWith(`/${VPN_BLOCKED_SEGMENT}`);
4848

4949
export const config = {
50-
matcher: [String.raw`/((?!_next/static|_next/image|.*\.).*)`],
50+
// Next.js requires that this is a static string and fails to read it if it's
51+
// a String.raw, so let's disable this rule
52+
// eslint-disable-next-line unicorn/prefer-string-raw
53+
matcher: ["/((?!_next/static|_next/image|.*\\.).*)"],
5154
};

0 commit comments

Comments
 (0)