主题: 解决跨域上传图片问题
作者: cayrth, 发布日期: 2014-03-06 11:31:56, 浏览数: 3107

http://aaa.xxx.com

http://bbb.xxx.com




JS存放在bbb.xxx.com

<script src="http://bbb.xxx.com/js/kindeditor/kindeditor.js"></script>


KindEditor.ready(function (K) {

        var editor = K.editor({
            uploadJson: 'http://aaa.xxx.com/upload_json.ashx',
            allowFileManager: true

});


aaa.xxx.com站点下配置crossdomain.xml

<?xml version='1.0'?>
<!DOCTYPE cross-domain-policy SYSTEM 'http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd'>
<cross-domain-policy>
  <allow-access-from domain="bbb.xxx.com" secure="true" />

</cross-domain-policy>


体验跨域上传


发表新帖 发表回复