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
1
vote
1answer
46 views

Why is CORS-Event-Count" event type is not available for selection in the "Event Log File Browser"

Few users might be receiving emails as "Get Ready to Enforce the CORS Allowlist for Lightning Apps" stating that their org has one or more external domains calling on Salesforce resources ...
0
votes
0answers
63 views

Origin has been blocked by CORS policy

I understand there are lots of questions and answers related to CORS policy, but here I wanted to make sure if I'm understanding it right and solving it the right way. I have a visualforce page that ...
0
votes
0answers
12 views

Secure Marketing Cloud Custom Activity UI

I have hosted SFMC UI dependent files on Azure WebApp built on NodeJS and Backend API on Azure Function App. I need to secure UI files i.e when someone loads index.html it should block access except ...
0
votes
0answers
42 views

Suggestion on how to fix CORS error in Lightning Out

I have below vf page in org A. Created an aura app- PublicApp and LWC- cardCmp in org B. Also, I have added entry of org A's domain URL in CORS setting in org B. When I run below VF in org A then I ...
0
votes
1answer
40 views

Lightning Aura CORS Blocked using JSZip library

I have files on a sharepoint server which I want my lightning aura component to get and download for me. I am using JSZip to zip the files together. As my download function requests the files from the ...
0
votes
0answers
75 views

Salesforce LWC - Access image as base64 from content version

I have an LWC which shows an image and allows me to draw on that image. The component requires URL or base64 as input, everything works with static images But I am unable to access the image from ...
0
votes
0answers
199 views

No 'Access-Control-Allow-Origin' header is present with JavaScript fetch request

I am trying to make this fetch request to the user interface api using react: const newpost = { method: "POST", headers: { Authorization: "Bearer " + this.state.accessToken,...
0
votes
2answers
115 views

Log in to salesforce from a react app

I need to request an authorization code so my application can make a simple request to salesforce. Hitting the url in the article redirects me to the right page where I can grab the code, but I first ...
0
votes
0answers
26 views

CORS error attempting to connect my react app to salesforce

I want my react application to be able to log itself into salesforce without the user having to do anything, so am trying to initiate an authenticated connection to my instance. I have stored some ...
0
votes
1answer
735 views

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

The developer has included the Web-to-Lead form I have provided in his React - js application. I have enabled the CORS in Salesforce, but the developer is receiving the below error message, when they ...
1
vote
0answers
28 views

How do i use wordpress navigational menus in salesforce communites site using CMS Connect? Running into CORS and CSP issues

Hey Everyone! I want to use the nav menu from or wordpress site on our salesforce communities based help center using Salesforce CMS connect. But, I am running into some issues that the wider internet ...
0
votes
0answers
31 views

CORS issue while authenticating an external web app to Salesforce

I'm trying to authenticate to saleforce using Connected App and web application, My request succeed with Postman but when I try send the request from the Web App I get CORS issue and OAuth ...
1
vote
1answer
117 views

What could cause a static resource to be unavailable on Lightning Community (Experience)?

I have a Lightning Community (Experience) where we are using CMS Connect to pull in a header and footer from a static resource. The resources there are not loading, though. In the Builder tool, they ...
0
votes
1answer
271 views

CORS issue in LWC

I am testing on Field Service Lightning mobile app LWC pilot feature. Here apex is not supported in Field service mobile with LWC. So, I am trying to make a SF rest resource callout, to get the ...
0
votes
1answer
58 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://...
2
votes
0answers
119 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
171 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
179 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
844 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
46 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
30 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
265 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
185 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
119 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
28 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
427 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
1k 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
611 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
404 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
110 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 ...
1
vote
0answers
1k 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
123 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
57 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
826 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 ...
1
vote
0answers
88 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
244 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
241 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
231 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
80 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 ...
1
vote
1answer
431 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
492 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
157 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
1k 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
98 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 ...
5
votes
1answer
412 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
1k 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
327 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
126 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
301 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"> ...