fix(api): allow AI review CORS methods - #685
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · No blocking issues spotted. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Motivation
PUTandDELETErequests for AI review config and BYOK key removal, but the API CORS preflight only advertisedGET, POST, OPTIONS, causing browsers to block those calls.Description
Access-Control-Allow-Methodsheader to includePUTandDELETEso browser preflights permit the AI review and BYOK routes by advertisingGET, POST, PUT, DELETE, OPTIONSinsrc/api/routes.ts.PUTfor/v1/repos/:owner/:repo/ai-reviewandDELETEfor/v1/repos/:owner/:repo/ai-keyintest/integration/api.test.ts.src/api/routes.tsandtest/integration/api.test.ts.Testing
git diff --checkwhich passed locally.npm test -- test/integration/api.test.tsbutvitestwas not available in the environment so the test run could not be executed.npm installto install test dependencies, but the install failed due to a403 Forbiddenfrom the npm registry foresbuild, preventing full test execution.Codex Task