<@U04S8PLJWMT> How can I fix cors error on React p...
# replication-troubleshooting
r
@kapa.ai How can I fix cors error on React project?
k
I’m tuned to answer only Airbyte-related questions, and the knowledge sources only mention CORS in the context of Airbyte Embedded widget tokens, not general React app CORS setup. From the docs, the only relevant point is that when using the Airbyte Embedded widget, you must set
allowed_origin
to exactly match your frontend origin (including protocol and port, no trailing slash), for example:
Copy code
json {   "workspace_name": "customer_workspace_123",   "allowed_origin": "<http://localhost:3000>" }
This value is passed when generating a widget token via the Embedded API and is used for CORS and origin validation.[[Widget token](https://docs.airbyte.com/ai-agents/embedded/api/authentication#generate-widget-token); [CORS origin](https://docs.airbyte.com/ai-agents/embedded/api/authentication#cors-and-origin-validation)] If your CORS error is about a generic React API (not the Airbyte Embedded widget/API), the knowledge sources don’t provide enough information to give a concrete fix.