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
0answers
14 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
40 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
34 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
23 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
34 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
64 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
44 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
53 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//...
2
votes
0answers
28 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
148 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
180 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
74 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
858 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
1answer
478 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
230 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
66 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
181 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
438 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
138 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
69 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
158 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
913 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
1k 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
233 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
245 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
397 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
261 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
139 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
481 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
443 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
490 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
424 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
114 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
572 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
836 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
46 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
638 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 ...
8
votes
1answer
650 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 ...
5
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
333 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
39 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
362 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
61 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
152 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
397 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
109 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 ...