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
AbAb 

Refused to connect to because it violates the following Content Security Policy directive

Hello,

I have below error on console.
what can be reason please ?
aura_prod.js:688 [Report Only] Refused to connect to 'https://company--uat.lightning.force.com/aura?r=70&other.apex_Lead_Create.getResponsible=1' because it violates the following Content Security Policy directive: "connect-src https://static.lightning.force.com https://api.bluetail.salesforce.com https://staging.bluetail.salesforce.com https://preprod.bluetail.salesforce.com blob: *.visualforce.com https://company--uat--c.documentforce.com https://cs174.salesforce.com https://notification-service.sfproxy.null.fra.aws.sfdc.cl wss://notification-service.sfproxy.null.fra.aws.sfdc.cl".

 
Best Answer chosen by Ab
SwethaSwetha (Salesforce Developers) 
@Sandrine , Looks like this error is being thrown when you are running reports in the console. Ideally, this does not impact normal operating procedures

I've come across related scenarios wherein the following helped
Configure Remote Site Settings(https://help.salesforce.com/s/articleView?id=sf.configuring_remoteproxy.htm&type=5), Adding Remote Site Settings(https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm), Create CSP Trusted Sites to Access Third-Party APIs(https://developer.salesforce.com/docs/atlas.en-us.232.0.lightning.meta/lightning/csp_trusted_sites.htm)

Related: https://salesforce.stackexchange.com/questions/379686/refused-to-load-the-script-as-it-violates-content-security-policy-while-working

If this information helps, please mark the answer as best. Thank you
 

All Answers

SwethaSwetha (Salesforce Developers) 
HI Sandrine,
What action are you performing that is throwing this error? Thanks
AbAb
i have no idea, i am new to lighning and I don't know which event is firing it
SwethaSwetha (Salesforce Developers) 
@Sandrine , Looks like this error is being thrown when you are running reports in the console. Ideally, this does not impact normal operating procedures

I've come across related scenarios wherein the following helped
Configure Remote Site Settings(https://help.salesforce.com/s/articleView?id=sf.configuring_remoteproxy.htm&type=5), Adding Remote Site Settings(https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm), Create CSP Trusted Sites to Access Third-Party APIs(https://developer.salesforce.com/docs/atlas.en-us.232.0.lightning.meta/lightning/csp_trusted_sites.htm)

Related: https://salesforce.stackexchange.com/questions/379686/refused-to-load-the-script-as-it-violates-content-security-policy-while-working

If this information helps, please mark the answer as best. Thank you
 
This was selected as the best answer