Wymeditor across subdomains. (Cross site permission issue.)

梦想的初衷 提交于 2019-12-10 09:26:00

问题


I have wymeditor on sub1.domain.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?


回答1:


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



来源:https://stackoverflow.com/questions/2206586/wymeditor-across-subdomains-cross-site-permission-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!