Questions tagged [cors]

Questions related to Cross-origin resource sharing (CORS) within Salesforce. This error can usually be identified using the browser's developer tools.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

Enable CORS for Visualforce page

I developed Visualforce page and I want to redirect to external website using apex:actionFunction, every time I execute actionFuncton I got the following error Access to XMLHttpRequest at 'https://...
1
vote
0answers
34 views

CORS error loading 3rd party Google API in LWC

I need some help because I'm encountering a CORS error using the Google API javascript library (taken from https://apis.google.com/js/api.js) running inside Lightning Web Components. Error message in ...
1
vote
1answer
42 views

Marketing Cloud API Request - Access to fetch at '[auth URL]' from origin 'https://localhost:3000' has been blocked by CORS policy

I'm hoping someone can help me with this as I've been struggling with it for a few days now... Issue: Access to fetch at '[auth url]' from origin 'https://localhost:3000' has been blocked by CORS ...
0
votes
1answer
42 views

What does same origin policy mean when trying to submit a Web to lead form via AJAX? [closed]

I am stuck working on a task, I get a same origin policy error : Access to XMLHttpRequest at 'https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8' from origin 'http://localhost' has ...
0
votes
1answer
215 views

Call Salesforce API from client side code in Aura/LWC

I want to call Salesforce REST APIs (to the same salesforce org where lightning component is built) from client side JS code in Aura/LWC. I have done some research and thought of this approach. Add ...
0
votes
0answers
38 views

How does Salesforce “external services” manage CORS?

I start by testing calling a REST API from Postman : this works. I then set up a Salesforce "External Service" and call the same service from a Flow : this works. Then I create a LWC ...
0
votes
0answers
23 views

Cannot get custom font to work in Community Pages- have tried many things to fix

I followed these instructions to the letter in my Dev Org: https://developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/communities_dev/communities_dev_customize_font.htm I've tried ...
1
vote
0answers
100 views

Is it possible to return CORS headers (Access-Control-Allow-Origin) on 401 Unauthorized responses?

I've enabled CORS and am using My Domain to successfully make REST API requests from a browser, after getting an Access Token via the User-Agent flow. My goal is to also use the Refresh Token to ...
1
vote
1answer
70 views

iframe/embed salesforce into another site

Is this possible to do anymore? I'm trying to iframe Salesforce, in it's entirety for SSO functionality without having the user leave my web application. My application is a connected app and we would ...
1
vote
1answer
59 views

Lightning Out/Appointment Scheduling CORB issue

I have an FSL scheduling flow that is on a public community page, and am trying to expose it on an external site via lightning out (https://help.salesforce.com/articleView?id=ls_expose_flow_on_website....
0
votes
0answers
23 views

Visualforce CSS blocked in mobile hybrid page

I have a visualforce page that is delivered as a mobile hybrid page into a native iOS app. When I use a public CDN for CSS delivery all works fine. Salesforce security review (ISV / managed package) ...
1
vote
2answers
251 views

Flow exposed in external website using Lightning out - Not Rendering, no error

What I did Aura Component <aura:component> <lightning:flow aura:id="flowData"/> </aura:component> Controller ({ init: function (component, event, helper) { ...
1
vote
1answer
558 views

Using Google Maps API with Lightning Web Components to retrieve Latitude and Longitude - CORS issue

I need to get latitude and longitude results from a text input that takes an address or zipcode. I am trying to do this with Lightning Web Components either using a LWC input with loadScript or ...
0
votes
1answer
335 views

We added the header Access-Control-Allow-Credentials to true

We load JS code by creating a script tag with dynamic src endpoint and append the script element into the page our src will call resource apex class (@RestResource) I know that Community domain is ...
4
votes
2answers
282 views

Externally hosted Javascript is unable to access Visualforce page

From my Visualforce page I am calling an externally hosted Javascript app: <apex:page> <apex:iframe src="https://external.com/index.html" id="theFrame" /> </apex:...
1
vote
1answer
89 views

OAuth 2.0 JWT Bearer Flow - XMLHttpRequest CORS and SameSite error and Gack

We are implamenting a chatbot using the OAuth 2.0 JWT Bearer Token Flow and see the above errors in the browser client degugger. We already have a valid access token and the origin has already been ...
0
votes
0answers
725 views

Web-to-lead API CORS issue

I am using the We-to-lead form to populate Sales Force, but I would like the form to submit via AJAX rather than default form submission. The default form submission works fine and populates Sales ...
0
votes
0answers
59 views

CORS wildcard with multi-level subdomains

I'm working through enabling the salesforce embedded login form on a website. I have a test environment for the website that is a bit dynamic and changes with different git branches. For example: ...
1
vote
0answers
55 views

Authenticate Custom Content Block throws a CORS issue

I'm sitting up the SSO login for my application which is a custom content block by redirecting the user to the link below: var redirectRoute = "https://" + process.env.DEFAULT_BASE_URI + &...
0
votes
1answer
428 views

CORS error when calling SF rest api from localhost

I have a small JS application running on localhost. I am getting an access token through the user-agent flow (this works fine). I then make an http request to the identity endpoint to get back my user ...
0
votes
0answers
29 views

Issue with JSForce Login - origin 'http://localhost:3001' has been blocked by CORS policy [duplicate]

I am trying JSforce for the first time. I created the OOTB lwcdev node app and then just adding the login method as per the documentation . import { createElement } from 'lwc'; import MyApp from '...
1
vote
0answers
64 views

CORS problem in Lightning

My Lightning component makes 'GET' callouts for two different URLs of the same service. For one it goes correct each time: https://cors-anywhere.herokuapp.com/https://integration.visma.net/API/...
2
votes
1answer
166 views

Lightning Out LWC File Not Found?

I know I'm not the first person to ask about this, but I have yet to find a solution to fix it. Problem: I'm receiving a 404 error (file not found) when trying to load a lightning web component via ...
1
vote
0answers
162 views

Whitelist ionic://localhost in Salesforce Org for CORS

We are doing REST calls from JavaScript in an IONIC mobile app. Which calls the APIs of Salesforce by using a connected App. On the development machine, we are able to call the standard Salesforce ...
1
vote
1answer
147 views

How to export flow to external website

I am trying to use flow in my local as mentioned here This is how the code looks like: And I'm getting this CORS issue: Access to XMLHttpRequest at 'https://casesrnd-dev-ed.lightning.force.com//...
3
votes
0answers
65 views

How to enable CORS in a community

Hi i've recently encountered a problem where i needed CORS to be enabled for some domains. In the Salesforce Org i can specify CORS to be enabled for some domains. The problem lies with community ...
0
votes
1answer
307 views

How can i use Marketing cloud Rest API in client side?

Im trying call one endpoint from marketing cloud rest api with AJAX, but im having problems with CORS. This is the error: No 'Access-Control-Allow-Origin' header is present on the requested resource. ...
0
votes
1answer
397 views

How to get the JSON response using Einstein in Web Recommendations?

According to this article, web recommendations can be delivered via JSON response or HTML/JS. It mentions that the JSON response is the best method. However, there is no documentation for getting it. ...
1
vote
2answers
123 views

CORS Issue on Personalization Builder output [duplicate]

Our current implementation method uses SFMC's client-side code snippet that returns and places it's HTML in our module and outputs the following on the page: <script src="https://[MID].recs....
1
vote
1answer
797 views

I am not able to add the url of my community page to chat with customers section in service console

I am trying to implement chatbot on my community page so when i am trying to add the url into service console's chat with customer section, but it says "Origins may not contain paths or queries, since ...
0
votes
0answers
88 views

Content Builder and CORS

I'm trying to force the download of an image, that is hosted in the Content Builder, from a Cloud Page using JS. Everything work properly if I use an image hosted on https://imgur.com/ but if I use ...
4
votes
1answer
301 views

Salesforce (Lightning components ) CORS policy blocks origin from same domain

I'm using the script below to get the most dominant color of an image, but Salesforce doesn't allow me to read the content image from Javascript due to CORS policy. Do you know how i could achieve ...
0
votes
1answer
892 views

Marketing Cloud API CORS problem

I would highly appreciate if anyone could help me in handling CORS policy for Salesforce Marketing Cloud API requests… The situation is following: I need to make direct API calls to Marketing Cloud ...
2
votes
1answer
230 views

LiveAgent giving 503 error

Banging my head against a wall here. I have enabled LiveAgent in my service cloud app. I have added a CORS setting I have added the button to my website Button is showing 'Chat with an expert' which ...
0
votes
1answer
91 views

POST to an external API from visualforce page

I am using OpenCTI in Lightning to enable click to dial. I want to click on the phone number and call an external API to make the dial. I have a visualforce page as CTI Adapter. When the page loads ...
1
vote
0answers
259 views

Lightning Runtime Flow URL retURL to any page on salesforce is broken because of CORS

CORS Error: CORS: No 'Access-Control-Allow-Origin' header is present on the requested resource. Access at XMLHttpRequest at 'https://domain-dev-ed--c.na94.visual.force.com' from origin 'https://...
0
votes
2answers
2k views

CORS error in Visualforce page

Still faxing the same issue.After adding two URL's. <apex:page showHeader="false" sidebar="false" lightningStyleSheets="true" standardStylesheets="false" controller="TW_MultipleUploadCtrl"> ...
2
votes
1answer
2k views

Lightning Out: CORS error even after whitelisting force.com site

I have a force.com site. I access one visualforce page from this site. On this vf page is a lightning-out application. All of the lightning-out requirements to run on a vf page has been set: ...
0
votes
2answers
356 views

Access PDF File from the Files Tab

When I'm trying to access a pdf file from the files tab, I'm running into the below issue. Message: Cross-origin redirection to https://name-space--c.documentforce.com/sfc/servlet.shepherd/document/...
3
votes
1answer
4k views

Blocked by CORS policy: No 'Access-Control-Allow-Origin' header on the requested resource

I am trying to use a Google Charting library inside a Lightning Aura Component. Component <aura:component implements="flexipage:availableForAllPageTypes"> <ltng:require scripts="{!$...
1
vote
0answers
389 views

Unable to captureStream from a video element with salesforce content as the video source

We're looking to stream content in a HTML tag through a video chat service, TokBox. This content is currently housed in Salesforce Files, and we're trying to access this content via the "...
3
votes
1answer
2k views

REST API OAuth2 CORS Issue

Problem: I have a separate app, from which I want to allow the user to authorize sharing data with Salesforce. The user clicks a button on the site, which executes a Javascript function that makes a ...
2
votes
0answers
497 views

REST API - Issue connecting JS app when CORS and Remote Site are both setup properly

I cannot connect to Salesforce to automatically create accounts from my javascript app. I continue to get the error: "Failed to load https://login.salesforce.com/services/oauth2/token: No 'Access-...
0
votes
1answer
316 views

Salesforce SOAP Login request doesn't return Access-Control-Allow-Origin in server side

We are trying to establish username-password authorization from javascript (visualforce or lightning) but this doesn't work. We are trying to login from Organization A to Organization B. POST ...
0
votes
2answers
3k views

Make HTTP POST request from Lightning Component

I want to make a post request to a server, using this code: ({ start : function(component, event, helper) { var xhr = new XMLHttpRequest(); var url = "https://site.com/service"; ...
0
votes
1answer
146 views

Invoke External REST API from VisualForce or Lightning

Today invoking REST APIS from Visualforce or Lightning requires proxying them through a server side controller written in Apex, which is not the most modern of programming languages. Is it possible ...
2
votes
0answers
575 views

No 'Access-Control-Allow-Origin' header error using jsforce in React app (200 OK, CORS Added)

I'm having this issue when attempting to access the Salesforce API from my React app (inside a vf page). Seems odd that it would recognize this as a cross-origin request, but I whitelisted the origin, ...
2
votes
1answer
585 views

CORS issues with DEManager Marketing cloud

Is there any possibility to use DEManager without facing CORS issues? Something like whitelisting the domains for our external websites?
2
votes
0answers
528 views

Lightning out : Access-Control-Allow-Origin error // CORS added

We want to add a Lightning component to an external page. OAuth token is working, and the page's URL is added to the CORS list. However, we are still getting an error: "No 'Access-Control-Allow-...
2
votes
0answers
471 views

Intermittent Lightning out CORS issue with external site

I'm running into a CORS issue with a lightning out component running on an external website where Salesforce appears to be redirecting to the visualforce domain to load lightning out and not ...