+ Start a Discussion
chiman chandra 29chiman chandra 29 

Refused to display in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".

Refused to display  in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".

How to fix this issue,Due to iframe this error was coming 
Raj VakatiRaj Vakati
Add URL and content security policies 
Refer this link 

https://stackoverflow.com/questions/49804998/page-wont-load-through-iframe
https://salesforce.stackexchange.com/questions/121164/salesforce-summer-16-page-not-loading-in-iframe
https://salesforce.stackexchange.com/questions/140417/why-does-salesforce-forbid-to-have-lightning-inside-of-a-frame-of-visualforce-pa?rq=1
https://developer.salesforce.com/forums/?id=9060G0000005SQwQAM
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Chiman,

Greetings to you!

Please refer to the below links with a similar discussion which might help you further with the above issue.

https://salesforce.stackexchange.com/questions/121164/salesforce-summer-16-page-not-loading-in-iframe

https://developer.salesforce.com/forums/?id=9060G0000005SQwQAM

https://salesforce.stackexchange.com/questions/140417/why-does-salesforce-forbid-to-have-lightning-inside-of-a-frame-of-visualforce-pa?rq=1

https://stackoverflow.com/questions/37799258/content-security-policy-directive-frame-ancestors-self?rq=1

https://stackoverflow.com/questions/49804998/page-wont-load-through-iframe

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
chiman chandra 29chiman chandra 29
Thank u issue fixed
Chaitanya EluriChaitanya Eluri

Hi Chiman,

Can you let me know how u've fixed this issue? I'm also facing the same issue

Thanks

Chaitanya

Dvir Shavit 8Dvir Shavit 8
@chaitanya Eluri
if you're trying to iframe a salesforce site you can do it by updating Clickjack Protection LevelAllow framing by any page (No protection) in the site details edit page.
Ian Lin 565Ian Lin 565
Hi chiman,

I am getting same error.

Please let us know the solution.
 
Francisco Javier Ortegon TesiasFrancisco Javier Ortegon Tesias
Hi, I've been facing the same issue, fixed out by unchecking the user permission "development mode" in the User advanced details page
Regards