我正在尝试从instagram获取JSON文件,当我创建$ http.get时出现错误:
insta.ctrl:
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
我的apache2的conf
XMLHttpRequest cannot load #url_of_intagram_api_here. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.
Chrome上的错误消息:
~
当我在Chrome中禁用互联网安全时,它可以正常工作。 有任何想法吗?