Cross domain restrictions and subdomains

前端 未结 1 2066
傲寒
傲寒 2021-01-19 03:19

Is there a cross domain policy restriction for subdomains?

If I have an application on paint.xxxx.com which is manipulating images from image.xxxx

相关标签:
1条回答
  • 2021-01-19 03:52

    yes the cross domain restriction applies for subdomains.

    The solution is to put

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

    in the top of the js file(s) for both the parent domain and the child 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.

    0 讨论(0)
提交回复
热议问题