Skip to main content
Question

Access-Control-Allow-Origin

  • May 22, 2025
  • 3 replies
  • 25 views

Forum|alt.badge.img

Hello Sir

 

Greetings of The Day

 

I wish to bring it your kind notice that Currently i am Integrating Salesforce to Box.com and I am facing a Issue regarding uploading a file .

 

Following Error I got:

 

"Access to XMLHttpRequest at 'https://upload.box.com/api/2.0/files/content?parent_id=0' from origin 'https://c.ap15.visual.force.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

 

Let me Know if You have any further queries on the same ,awaiting your response.

 

Thanks and Regards

Sanjay Kumar Prajapat

 

 

3 replies

Forum|alt.badge.img

 please have a look at this page: 

 

https://developer.box.com/guides/best-practices/cors/

 

You will need to enable CORS for the domain you're working on.


Forum|alt.badge.img

Sir

 

I have already did it,still i have got error


Forum|alt.badge.img

Ok great!

 

If you are using the standard Box for Salesforce managed package integration, then you may need to add the domain(s) to Salesforce’s Remote Site Settings:
https://help.salesforce.com/articleView?id=configuring_remoteproxy.htm

 

For Communities and Lightning components in general, you need to add the domain(s) to CSP Trusted Sites:
https://help.salesforce.com/articleView?id=csp_trusted_sites.htm