[Duplicate]: Protect api key routes#69
Conversation
Gautam25Raj
left a comment
There was a problem hiding this comment.
Hi @resolvicomai, thanks for submitting this PR to address the API key route protection!
Before we merge, we have a few pieces of feedback regarding the implementation and the test:
-
Workflow Reminder: For future contributions, please comment on the issue and wait to be assigned before opening a PR. This helps us coordinate and prevents overlapping work.
-
Redundant Route Matchers: In Next.js middleware, the
:path*syntax matches zero or more path segments. *"/api-keys/:path*"already covers both/api-keysand all of its subpaths (like/api-keys/create).- Please remove the redundant base path matchers (e.g.,
"/api-keys","/admin","/profile") fromconfig.matcherand stick to the wildcards (e.g.,"/api-keys/:path*").
- Please remove the redundant base path matchers (e.g.,
If you can update the PR to clean up the matcher array and remove the test file, we'll be ready to get this formatted and merged!
|
Updated in Re-validated:
|
|
Hi @resolvicomai, thank you for the PR! Unfortunately, we already have an open PR addressing this issue, so we will be closing this one to avoid duplicate work. However, we currently have an unassigned open issue (#61). If you'd like to work on that one, please drop a comment directly on #61 requesting assignment so we can assign it to you. Thanks! |
Summary
/api-keysand/api-keys/:path*to the Studio proxy matcherFixes #65
Validation
npm run test:contracts -w @veriworkly/studio -- proxy-auth.contract.test.tsnpm run test:contracts -w @veriworkly/studionpm run lint -w @veriworkly/studionpm run format -w @veriworkly/studio -- proxy.ts tests/contracts/proxy-auth.contract.test.tsNote:
npm audit signaturescurrently fails before signature validation because npm cannot resolve@types/node@25.8.0from the existing dependency graph.