尽管设置了以下标题:
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'self' 'unsafe-inline' *.speech.is http://bits.speech.is https://bits.speech.is http://speech.is
JavaScript 仍然阻止我访问 iframe.contentWindow.document:
Error: Permission denied to access property 'document'
speech.contentWindow.document
在at之后从 Firefox 控制台http://bits.speech.is
。Chrome 给出了更冗长但仍然神秘的内容:
SecurityError: Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match.
code: 18
message: "Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match."
name: "SecurityError"
stack: "Error: Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match.↵ at <anonymous>:2:21↵ at Object.InjectedScript._evaluateOn (<anonymous>:580:39)↵ at Object.InjectedScript._evaluateAndWrap (<anonymous>:539:52)↵ at Object.InjectedScript.evaluate (<anonymous>:458:21)"
有没有办法追踪这个安全策略是在哪里设置的?如何弄清楚我还缺少什么?