function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John VitalesJohn Vitales 

Embedding website with Content Security Policy into salesforce

We have a website that has Content Security Policy.

We are looking to embed this website using an iframe however we keep getting the error log below.

What is the proper way to add salesforce into a website's CSP?

 

error log:

Refused to frame 'https://my-example-website.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors {{list of added referrers}}

Referrers include:

https://*.my.salesforce.com

https://*.lightning.force.com

VinayVinay (Salesforce Developers) 
Hi John,

Can you try steps mentioned below

https://help.salesforce.com/s/articleView?id=sf.csp_trusted_sites.htm&type=5

Thanks,
John VitalesJohn Vitales

Hi Vinay,

I've tried this already as well. I believe this is adding a website into Salesforce's allow-list.

I'm tryin to do the opposite.  I need to add salesforce into the website's allow-list as it has security measures, CSP.