跨子域的Wymeditor。 (跨网站权限问题。) [英] Wymeditor across subdomains. (Cross site permission issue.)

查看:125
本文介绍了跨子域的Wymeditor。 (跨网站权限问题。)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在sub1.domain.com上有wymeditor,可以通过sub2.domains.com上的网页访问。

I have wymeditor on sub1.domain.com, which is accesssed by a page on sub2.domains.com.

此活动会出现错误

var styles = this._doc.styleSheets [0];

var styles = this._doc.styleSheets[0];

拒绝< http://removed.example.com>获取属性HTMLDocument.styleSheets from< http://removed2.example.com> ;.

我假设这是一个跨站点脚本的restriiction,但我想从我的媒体从一个不同的域。

I am assumoing this is a cross site scripting restriiction, but I would like to srve my media froma diffrent domain. How can I do this.

推荐答案

添加行 document.domain =domain.com; ,将 domain.com 替换为您的实际域名。

Add the line document.domain = "domain.com"; in both pages, replacing domain.com with whatever your actual domain name is.

这篇关于跨子域的Wymeditor。 (跨网站权限问题。)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆