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
2
votes
0answers
21 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
56 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
123 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
54 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....
0
votes
1answer
515 views

Cors Origin issue : No 'Access-Control-Allow-Origin' header is present on the requested resource

I am facing issue in connecting the angular to salesforce for getting the access token When i try this through postman it working fine . but when i try this through angular i am getthing following ...
1
vote
0answers
280 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
115 views

CORS policy : No 'Access-Control-Allow-Origin' header is present on the requested resource

My requirement is that I want to expose my lightning component to an external website(HTML webpage) without user having to log in to salesforce. For this, as per this questions's answer., I have done ...
0
votes
0answers
47 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
144 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
198 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
92 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
64 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
123 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
568 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"> ...
1
vote
1answer
988 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
193 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/...
1
vote
1answer
2k 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
149 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
1k 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
348 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
242 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
2k 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
137 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
441 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
357 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?
1
vote
0answers
479 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
396 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 ...
1
vote
0answers
98 views

CORS issue during rest api call from browser

I know this will be an known issue as most of you have faced it.i have searched and reached out to quite some tech folks but no luck in getting it resolved. question (1) Issue with CORS we have and ...
1
vote
0answers
511 views

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

I have overridden the Quote page with a visualforce page that when it loads it reads some settings and displays different version of the page based on a bunch of different factors. In some cases the ...
0
votes
0answers
773 views

How can I show the mini page layout on hover in Lightning?

I have a visualforce page where I'm trying to show the mini page layout when the user hovers over a link. I tried using the technique described here: https://www.xgeek.net/salesforce/use-salesforce-...
0
votes
1answer
44 views

Is CorsWhitelistEntry insertable/updatable through APEX/DML?

CorsWhitelistEntry cors = new CorsWhitelistEntry(); cors.UrlPattern = 'sdfsdf.com'; insert cors; Wherever I try the above (or any other DML operation), I get an error message: DML operation ... ...
1
vote
1answer
544 views

CORS issue with lightning out used in external website

I have deployed a nodejs application on Heroku, it has one lightning component embedded using lightning out. But I am getting the below error: Cross-Origin Request Blocked: The Same Origin Policy ...
7
votes
1answer
618 views

Change URL of Popup Window from Lightning

So I'm in the situation where I have a Lightning component that's embedded in LEX, and it provides links that open up a new window containing a Visualforce page. Each link opens the same page but ...
4
votes
1answer
4k views

CORS whitelisting not working as expected

I'm having an issue with CORS where I'm unable to make a POST request to a Salesforce site from another site, but one I have listed in my CORS whitelist. Not sure if I have something set up wrong, or ...
2
votes
2answers
317 views

salesforce mobile sdk 5.0 CORS error while rest api using force.js

I'm getting the CORS error while doing REST api call on Salesforce using the new force.js library. I've also added question on Salesforce Dev Forum: https://developer.salesforce.com/forums/ForumsMain?...
4
votes
1answer
1k views

Lightning Out using ltng:require: How to deal with CORS when Locker Service enabled?

I have built a dependency app using extends="ltng:outApp" that is hosted on heroku. It runs on an express node.js server and I use salesforce-oauth2-flow. Lets call it myApp myApp is whitelisted in ...
0
votes
1answer
37 views

Standard Chatter:feed component returning a CORS error

We have a custom VisualForce page that consolidates a lot of information into one place. One of the components that we have is a standard Chatter:feed. Everything works great, unless we try to post a ...
0
votes
1answer
339 views

Error when writing to Data Extension using java script code

I'm sure you can help me with this: We are integrating our website with Marketing Cloud, so we are using JavaScript to send data into a Data Extension to start a Journey. The Script works, it ...
1
vote
1answer
60 views

Inline Visualforce page with AngularJS Templates throwing CORS Error

I'm working on an embedded VF page single page app and attempting to setup routes using ui.router ($stateProvider). I would like to break apart my views into inline templates but place them outside ...
1
vote
0answers
140 views

Calling @ApexRest web service (services/apexrest) from Visualforce page in same org [duplicate]

I've been looking all over the place to figure out how to approach this. I'm trying to call a web service (services/apexrest) from the same org. I'm recieving the following error: XMLHttpRequest ...
0
votes
1answer
385 views

Our form is giving the XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' error

I have researched and researched and tried everything out there on this SalesForce error we are getting. We were given an html form from Salesforce and it worked until we added our own conditional ...
11
votes
1answer
105 views

CORS issues with Chatter API Photo Posting

I have a Chatter Communities API request that creates a new user profile picture. This API callout works when I use an app like Ruby or even a cURL command. However, using an AJAX callout, I get a ...
3
votes
0answers
348 views

Ionic2 forcetk issue with CORS

following @ccoenraets' tutorial at http://coenraets.org/blog/2016/02/angular2-ionic2-salesforce/ I get an error with the CORS proxy (I think). Is it possible to deploy my own CORS app in heroku? Can ...
0
votes
1answer
2k views

Refreshing SFDC page from VF frame: CORS issue

I have a VisualForce page inside a standard SFDC Page Layout. For UX reasons, we want to be able to refresh the outer (parent) page when something is clicked on the VF page. When we try and do this ...
2
votes
1answer
1k views

Cross origin problem when uploading file from visualforce page

I am getting below problem when i try to upload a file on Google drive using save to drive button. XMLHttpRequest cannot load https://ap1.salesforce.com/servlet/servlet.FileDownload?file=...
0
votes
1answer
363 views

Error on HttpRequest from Visualforce to standard SF domain

We are trying to make an HttpRequest from a custom button that is on a Visualforce page (custom View override) using Javascript. The request is being sent to a custom report. It contains a set of ...
0
votes
1answer
973 views

Enabling CORS for visualforce domain

With Summer 15 release Javascript in HTML home page Components is not allowed, but is allowed in VF components/pages included in home page side bar. When I try to access DOM elements on salesforce ...
3
votes
1answer
575 views

Access to parent element from Visualforce page with javascript

I'm trying to access to an element located in an Standard Page with Jquery from my visualforce embedded. There's a way to have access to those elements, now I'm getting an error like: "Uncaught ...
8
votes
3answers
829 views

CORS APEX Rest Services

How can I get my custom Apex Rest Services to use the CORS settings? There are many similar questions like this one; but these were asked before CORS was supported.
1
vote
0answers
412 views

Apex REST CORS request

I'm getting an error upon calling my REST endpoint from a visualforce page with Angular. My error is this: XMLHttpRequest cannot load https://... A wildcard '*' cannot be used in the 'Access-...