Reputation: 35
I'm trying to connect to play.google.com in my website iframe and I'm receiving this error:
Refused to frame 'https://play.google.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://play.google.com".
Am I missing some thing??
Can I do something so that I can work?
The code reference which I took from google is here.
I was trying to render the iframe after using Android Management API. What I was expecting is when I open the url directly in new tab then it's working but when I try to open in iframe it's not working. It should work in iframe!
Upvotes: 0
Views: 1438
Reputation: 191
This problem can occur when you render the Managed Configurations iframe over an ‘http’ (unsecure) connection. I suggest you embed your iframe with an ‘https’ (secure) connection to prevent cross-site scripting attacks. I tested this locally, and swapping to ‘https’ resolved the issue in my tests.
Upvotes: 1