Fix cors error calling salesforce api from webflow
Webflow CRM embed without browser blocks
Edge OPTIONS and Allow-Origin for Salesforce REST proxy. For "fix cors error calling salesforce api from webflow", store SALESFORCE_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let Webflow hit only https://realcomposer.com/v1/workspace/fix-cors-error-salesforce-webflow with an rc_live_ client token.
CORS blocks Salesforce in Webflow
Low-code Webflow tools expose connector tokens in shared workspaces, so Salesforce credentials leak to every editor.
- Browser console CORS errors blocking launches
- Editors pasting secrets into reusable components
- Inability to test locally without disabling security
How RealComposer Solves This at the Edge
Bind vault keys to the Worker
Store SALESFORCE_ACCESS_TOKEN in the vault. Webflow never embeds the raw secret, only a revocable rc_live_ client token.
Set headers, mapping, and cache TTL
Configure headersTemplate to inject vault secrets, target https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}}, and Add output mapping fields that mirror the JSON contract your screen already expects.
Call from Webflow custom code
Call https://realcomposer.com/v1/workspace/fix-cors-error-salesforce-webflow with a restricted rc_live_ client token. Webflow never sends upstream secrets.
fetch('https://realcomposer.com/v1/workspace/fix-cors-error-salesforce-webflow', {
headers: { Authorization: 'Bearer rc_live_your_token' }
}).then(r => r.json());
{
"requestId": "req_fix-cors",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "fix-cors-error-salesforce-webflow"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"contactId": "sample",
"email": "sample",
"name": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 3
- Payload
- 252 B to 55 B (-78%)
curl -X GET "https://realcomposer.com/v1/workspace/fix-cors-error-salesforce-webflow" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Can Webflow call Salesforce without holding the production key?
Use scoped tokens where the vendor allows them on fix-cors-error-salesforce-webflow. Admin keys stay {{secrets.*}} references only.
How do I forward JSON bodies to POST upstreams?
fix-cors-error-salesforce-webflow POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard.
What happens if an upstream step times out?
Allowed origins on the fix-cors-error-salesforce-webflow client token restrict which domains may call the edge URL.
Sources & Definitions Used in This Answer
Deploy this Webflow + Salesforce Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.