Skip to content

fix: handle OPTIONS requests on /api/checks/run - #62

Merged
jasoncrawford merged 3 commits into
mainfrom
fix/options-handler
Feb 25, 2026
Merged

jasoncrawford merged 3 commits into
mainfrom
fix/options-handler

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an OPTIONS handler to /api/checks/run that returns 204 No Content
  • Prevents 400 errors in console when clients send preflight requests

Closes #60

Test plan

  • All 112 existing tests pass
  • Verify no more OPTIONS 400 errors in browser console / Vercel logs after deploy

🤖 Generated with Claude Code

Add an OPTIONS handler returning 204 No Content to prevent 400 errors
when clients send preflight requests.

Closes #60

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
site-status Ready Ready Preview, Comment Feb 25, 2026 3:37am

Request Review

@supabase

supabase Bot commented Feb 24, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (fix/options-handler) ↗︎

Deployments Status Updated
Database ✅ Wed, 25 Feb 2026 03:37:08 UTC
Services ✅ Wed, 25 Feb 2026 03:37:08 UTC
APIs ✅ Wed, 25 Feb 2026 03:37:08 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Wed, 25 Feb 2026 03:37:09 UTC
Migrations ✅ Wed, 25 Feb 2026 03:37:10 UTC
Seeding ✅ Wed, 25 Feb 2026 03:37:11 UTC
Edge Functions ✅ Wed, 25 Feb 2026 03:37:11 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Return 204 for OPTIONS preflight requests early in the middleware,
before Supabase auth processing. This fixes 400 errors on all routes,
not just the API endpoint.

Closes #60

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit e4b663c into main Feb 25, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — ae7b3a9e Deployed Feb 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPTIONS not supported

1 participant