iframe doesn't work? You may have run into it.

There is a requirement to display a website in an iframe, but after setting the src of the iframe, the iframe does not work. Then open the console and find the error as follows:

A search for it found the answer: https://stackoverflow.com/questions/37799258/content-security-policy-directive-frame-ancestors-self

The website sets the response header,

Thereby preventing iframes from being embedded in their own website .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325168225&siteId=291194637