How to solve "Content Security Policy" issue with store.

Highlighted
New Member
4 0 0

Hi all,

I had a problem when I use <iframe> in my apps. This is my problem:

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

I build an app with localhost, I do not know how to solve this problem.

Thanks

 
 
0 Likes
Highlighted
Shopify Staff
Shopify Staff
1555 81 282

Can you share more details about your implementation? Are you placing an iframe inside your already embedded app, or on the storefront for example? With a bit more info I can replicate and look into what might be the issue for you.

 

Cheers.

0 Likes
Highlighted
New Member
4 0 0

Hi Alex, 

I placed iframe inside my embedded app to load storefront page. I am building a third-party app to tracking behavior users, and imitate user behavior through position x, y to create a video which like record user. However, I read the policy change when load storefront page. So I am trying to find another alternative solution.

Thanks

 
 
 
0 Likes
Highlighted
New Member
1 0 0

First, ensure that the URL's you supplied in the App Whitelist and Auth callbacks are HTTPS.

Next, clear out your local storage (if the URL has changed since you last ran the app, and if anything goes wrong in general, this is a blunt tool to approach this).  It forces you to log out, clearing your cookies and such, and starts from scratch.

0 Likes