Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

Content security policy violated when opening a link inside an iframe

Hi,
I am getting the following error in my console of firebug
Content Security Policy: The page's settings blocked the loading of a resource at http://www.google.com/ ("frame-src data:").
This error happens when i click on a link on my page which is loaded inside an iframe.. Following screenshot will better explain it :
Here is the HTML of my page :
User generated imagewhat actually i want is that this opens in a new tab or a new window altogether.
I guess whats happening is that this is getting loaded inside the iframe and so content security policy is getting kicked in .

Here is the header for my page which has csp :
User generated imageThis www.google.com is just an example.. there can be any link in the iframe...
How should i handle this ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rohit Bajaj

ASKER

But here the frame content are indeed coming from the same domain..
Its returned by localhost.
You are getting the error above because localhost is trying to access google.com.  Are you saying you get the same error when localhost loads an iframe from localhost?