跨域限制和子域 [英] Cross domain restrictions and subdomains

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

问题描述

子域是否有跨域策略限制?

Is there a cross domain policy restriction for subdomains?

如果我在 paint.xxxx.com上有一个应用程序这是操作来自 image.xxxx.com 的图像,是否有任何跨域问题?

If I have an application on paint.xxxx.com which is manipulating images from image.xxxx.com, are there any cross domain problems?

推荐答案

是跨域限制适用于子域

解决方案是将

document.domain =example.com; //无论您的域名是

document.domain = "example.com" ; // whatever your domain name is

在父域和子域的js文件的顶部

in the top of the js file(s) for both the parent domain and the child domain

Google Document.domain和跨网站,应该有更好的解释,但我有同样的问题,这是对我有用的。

Google Document.domain and cross site and there should be a better explanation but I've had the same issue and that is what worked for me.

这篇关于跨域限制和子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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