Skip to content

fix: allow PUT in CORS for project docs API#9

Merged
gf5901 merged 1 commit into
mainfrom
fix/cors-allow-put-docs
Mar 22, 2026
Merged

fix: allow PUT in CORS for project docs API#9
gf5901 merged 1 commit into
mainfrom
fix/cors-allow-put-docs

Conversation

@gf5901
Copy link
Copy Markdown
Owner

@gf5901 gf5901 commented Mar 22, 2026

Problem

Browser CORS preflights for PUT /api/projects/:id/docs/:slug failed because PUT was not listed in Access-Control-Allow-Methods, so saving project docs from the UI could error.

Fix

Add PUT to allowed methods in:

  • infra/packages/api/src/index.ts (Hono cors() middleware)
  • infra/sst.config.ts (API Gateway CORS)

Deploy

Already deployed to production from local machine; this PR tracks the change in main.

Made with Cursor

Project docs use PUT for create/update. API Gateway and Hono CORS only
listed GET/POST/PATCH/DELETE, so browser preflights for PUT failed.

Made-with: Cursor
@gf5901 gf5901 merged commit 1a6ab8c into main Mar 22, 2026
4 checks passed
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.

1 participant