【发布时间】:2016-07-10 13:41:31
【问题描述】:
我已经按照this post 尝试了所有可能的代码,但代码给了我以下错误
XMLHttpRequest cannot load https://api.cloudinary.com/cloud_name/resources/image. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access.
代码(1)
$.get('https://app_key:app_secret@api.cloudinary.com/cloud_name/resources/image');
代码(2)
$.get('https://api.cloudinary.com/cloud_name/resources/image');
两者都无法通过身份验证。
注意:我没有使用任何服务器端编程。请给我任何客户端解决方案/代码。
【问题讨论】:
-
您得到的是 CORS 错误。如果您必须在标题中发送任何额外的参数,请尝试连接文档
标签: javascript jquery cloudinary