Skip to content

fix: add CORS support (permissive)#16

Merged
yurushao merged 1 commit intomainfrom
fix/cors-support
Feb 19, 2026
Merged

fix: add CORS support (permissive)#16
yurushao merged 1 commit intomainfrom
fix/cors-support

Conversation

@fantaclaw-ai
Copy link
Copy Markdown
Contributor

This PR adds Access-Control-Allow-Origin: * to the RPC router to support dApps running in browsers (e.g. localhost, Vercel deployments).

Changes

  • Dependencies: Added tower-http with cors feature.
  • Router: Applied CorsLayer::permissive() to:
    • Main HTTP RPC endpoint (port 8899)
    • WebSocket proxy endpoint (port 8900)

Why

Without this, browsers block fetch requests to the router due to CORS policy violations.

@yurushao yurushao merged commit 2f5d55b into main Feb 19, 2026
1 check 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.

2 participants