开发者

Wymeditor across subdomains. (Cross site permission issue.)

开发者 https://www.devze.com 2022-12-19 01:13 出处:网络
I have wymeditor on sub1.domain.开发者_StackOverflow社区com, which is accessed by a page on sub2.domains.com.

I have wymeditor on sub1.domain.开发者_StackOverflow社区com, which is accessed by a page on sub2.domains.com.

This line gives an error:

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

Permission denied for http://removed.example.com to get property HTMLDocument.styleSheets from http://removed2.example.com.

I am assuming this is a cross site scripting restriction, but I would like to srve my media from a different domain. How can I do this?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消