Skip to content

fix: use CORS-compatible Seedance updates - #21

Merged
lyz52789 merged 1 commit into
mainfrom
agent/fix-seedance-put
Jul 13, 2026
Merged

fix: use CORS-compatible Seedance updates#21
lyz52789 merged 1 commit into
mainfrom
agent/fix-seedance-put

Conversation

@lyz52789

Copy link
Copy Markdown

Summary

  • use PUT for Seedance actor and asset updates from the browser
  • add PUT aliases on the backend while retaining PATCH compatibility for existing API clients
  • cover all new routes with authentication regression tests

Why

The production edge currently advertises GET, POST, PUT, DELETE, OPTIONS for CORS preflight requests. Even after the application added PATCH, the edge response continued to omit it. Browsers therefore blocked actor rename before it reached the API. PUT is appropriate for these idempotent name updates and works with the deployed edge policy.

Test plan

  • targeted Seedance router regression tests
  • go test ./... -count=1
  • bunx prettier src/services/seedanceAssets.js --check
  • bun run build
  • production PUT preflight and unauthenticated route smoke tests after deployment

Route Seedance actor and asset updates through PUT so browser clients remain compatible with the production edge CORS policy. Keep PATCH aliases for existing API consumers and cover the new authenticated routes.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying new-api with  Cloudflare Pages  Cloudflare Pages

Latest commit: 39a41f1
Status: ✅  Deploy successful!
Preview URL: https://5c08d98d.new-api-d57.pages.dev
Branch Preview URL: https://agent-fix-seedance-put.new-api-d57.pages.dev

View logs

@lyz52789
lyz52789 merged commit faeab5f into main Jul 13, 2026
2 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