Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
3 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
133 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
31 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
240 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 ...
0
votes
0answers
56 views

NForce OAuth Connection Issue

I'm having issues connecting to Salesforce through my app. My goal is to create an account for the user when a button is clicked, and that the account is created by automatically logging into ...
2
votes
0answers
173 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
0answers
205 views

CORS error - Web-to-Case and reCaptcha

We are trying to implement reCaptcha on a Web-to-Case contact form, but encounter the following error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ...
0
votes
1answer
133 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
1answer
496 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
0answers
76 views

CORS Error for a CNAME'd URL

Lets say I've a Force.com Site page https://ms.satrangtech.com/file?id=XXXX that is a CNAME mask for https://satrangtech.secure.force.com/file?id=XXX. On this page, when the user clicks the delete ...
0
votes
1answer
117 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
299 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
249 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
398 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-...
1
vote
0answers
263 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
60 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
377 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
515 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
31 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
353 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
516 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
2k 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
265 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
985 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
33 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
270 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
57 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
105 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
336 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 ...
10
votes
1answer
83 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
328 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
837 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
313 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
897 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 ...
2
votes
1answer
476 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 ...
7
votes
3answers
585 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
371 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-...
1
vote
2answers
6k views

Why is CORS (localhost) whitelist not working for authentication?

So there are now settings to add domains to the CORS whitelist so they can access the REST API via javascript. I tried to get this to work using my localhost with an a local ssl so its https://coach....
1
vote
0answers
126 views

Want to remove Saleforce1 blue header using Jquery, but getting blocked due to Cross Domain security

Uncaught SecurityError: Blocked a frame with origin "https://c.na15.visual.force.com" from "page address is here "accessing a frame with origin "https://na15.salesforce.com". Protocols, domains, and ...
0
votes
0answers
471 views

How to send an Ajax request to a force.com visualforce page from our public domain Site.com site (across domains)?

We're trying to retrieve whether our service is available in particular zip codes. In Salesforce we have a custom object called "Service_Zone__c," each record of which has a zipcode and an "in"/"out" ...
2
votes
2answers
3k views

Access the force.com REST API with a pure Javascript page

I want to develop a front-end in Javascript (possibly with one of the fancy frameworks around such as AngularJS) that consumes the REST API of my Salesforce org. I don't want to embed my project in ...
1
vote
1answer
937 views

File Attachments over AJAX call (XMLHttpRequest error)

Im trying to write a script that will grab a series of attachments and zip them up using JSZip. All is working well but the script does a call to grab the download url it seems like whats happening ...