本地主机:来自源'null'的图像已被跨源资源共享策略阻止加载 [英] Localhost: Image from origin 'null' has been blocked from loading by Cross-Origin Resource Sharing policy
问题描述
我在两台计算机上打开网页,ip和localhost都尝试过:
奇怪的是,对于一台计算机, http: /192.168.1.100/dev
没有工作, http:// localhost / dev
。对于另一个,都没有工作。它说,
来自源'null'的图像已被跨源资源共享策略阻止加载:接收到无效的响应。因此不允许访问
没有一个答案,我发现似乎工作。我不明白为什么它只能在一台计算机上使用
localhost
。有任何建议吗?
编辑:
- 浏览器:Chrome版本34.0.1847.11
-
http://127.0.0.1/dev
无法使用 - code>插件阻止该文件。
- Browser: Chrome Version 34.0.1847.11 beta
http://127.0.0.1/dev
didn't work either- The uploaded version on server didn't work either
包含阻止文件的目录的名称为 AD16
。不知怎的,其他 AD01
, AD09
, AD22
c $ c> AD27 工作正常,但不是 AD16
。
c $ c> AdBlock ,一切正常。
同样的问题会出现在任何chrome插件上,目录名称为 AD_16
。
I'm opening the page on two computers, both ip and localhost tried:
Strangely, for one computer, the http://192.168.1.100/dev
didn't work and http://localhost/dev
did. For the other, neither worked. It says,
Image from origin 'null' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin
'http://localhost'
is therefore not allowed access.
None of the answers I found seem to work. And I don't understand why it only worked on localhost
on one computer. Any suggestions?
Edit:
It turns out, it was the AdBlock
plugin that blocked the file.
The name of the directory containing the blocked file was AD16
. Somehow the other AD01
, AD09
, AD22
, AD27
worked fine, but not AD16
.
Disabling AdBlock
and everything works fine.
The same problem would have occurred on any chrome with the plugin on, so we changed the name of the directory to AD_16
.
这篇关于本地主机:来自源'null'的图像已被跨源资源共享策略阻止加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!