Parth Solanki
Parth Solanki

Reputation: 3448

Error while accessing iframe from chorme extension, content_security_policy error

I am trying to access the Iframe from the chrome plugin and get the below error.

Refused to frame 'https://mysite.co/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors *".

I have already added this below line in my menifest.json file but it not works.

"content_security_policy": "script-src 'self' https://mysite.co/"

Please guide.

Upvotes: 1

Views: 629

Answers (1)

Parth Solanki
Parth Solanki

Reputation: 3448

I found the solution, I have to add child-src for the iframe as below.

"content_security_policy": "script-src 'self' https://mysite.co; child-src https://mysite.co; object-src 'self'"

Upvotes: 2

Related Questions