未捕获的SecurityError: Failed to set the 'domain'propert

Uncaught SecurityError: Failed to set the 'domain' property on 'Document': 'app.herokuapp.com' is not a suffix of ''.

本文关键字:the propert domain set to SecurityError Failed      更新时间:2023-09-26

我正在开发一个Phonegap应用程序,为了避免CORS保护,由于这个问题,我已经尝试在我的javascript文件中更改文档域。

现在我得到这个错误

Uncaught SecurityError: Failed to set the 'domain' property on 'Document': 'app.herokuapp.com' is not a suffix of ''. 

我怎样才能使我的phonegap应用程序有域名?

使用django-crossdomainxhr-middleware.py解决了我的问题!