开发者社区 问答 正文

访问一个地址报错No 'Access-Control-Allow-Origin'?报错

XMLHttpRequest cannot load http://static2.o2o2m.com/kindeditor-4.1.7/php/file_manager_json.php?path=&order=NAME&dir=image&1409534464521. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://cyhadmin.o2o2m.com' is therefore not allowed access.

展开
收起
爱吃鱼的程序员 2020-06-14 22:06:45 521 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你这是SPA应用吗,session已经过期了,ajax请求被拒

    跨域问题。在这里提问相比G会更快解决问题。

    <divclass='ref'>

    引用来自“ChaoserYao”的评论

    跨域问题。在这里提问相比G会更快解决问题。

    这是我使用kindeditor的图片空间时出现的 这是跨域错误。

    跨域CORS的问题。如果对端服务器可控的话,可以参考下面文章来进行设置 

    <spanstyle="line-height:1.5;font-size:10pt;">https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

    2020-06-14 22:07:03
    赞同 展开评论
问答分类:
PHP
问答地址: