我正在尝试与 django 和 Orbited 进行实时聊天,但我不断收到错误
我正在按照本教程了解如何设置简单的 django/orbited/stomp 实时聊天,并且我我完全遵循了他的做法,我什至复制了他的所有代码,但我仍然遇到这个我不明白的奇怪错误。
当我访问该网站时,我收到一条警告,提示“错误”。当我查看 Firebug 所说的内容时,它告诉我这两个错误:
Illegal document.domain value" code: "1009
http://127.0.0.1:9000/static/xsdrBridge.html
Line 68
Permission denied to access property 'Orbited'
http://127.0.0.1:9000/static/xsdrBridge.html
Line 92
我完全按照教程进行操作,但我无法弄清楚为什么会出现这些错误。我通过以下方式运行:
orbited -c orbited.cnf
我通过以下方式运行我的 django 开发服务器:
python manage.py runserver 0.0.0.0:8000
I'm following this tutorial on how to setup a simple django/orbited/stomp live chat, and I've followed everything exactly how he does it, and I've even copied all of his code, but I still get this one weird error that I don't understand.
When I go to the website, I get an alert that just says "Error". When I look at what Firebug has to say, it tells me these two errors:
Illegal document.domain value" code: "1009
http://127.0.0.1:9000/static/xsdrBridge.html
Line 68
Permission denied to access property 'Orbited'
http://127.0.0.1:9000/static/xsdrBridge.html
Line 92
I followed the tutorial exactly to the dot but I cannot figure out why I'm getting these errors. I run orbited by:
orbited -c orbited.cnf
and I run my django development server by:
python manage.py runserver 0.0.0.0:8000
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来像是 JS 的跨域问题?您正在 0.0.0.0 上运行开发服务器,并在 127.0.0.1 上运行。可能是这样。您如何使用网络浏览器访问该页面?
尝试在 0.0.0.0 上运行 Orbited 和 django 开发服务器,并使用此 IP 来访问浏览器中的页面。
sounds like cross domain problems for the JS? You are running the dev server on 0.0.0.0 and orbited on 127.0.0.1. Could be it. How are you accessing the page with your web browser?
Try running orbited and the django dev server on 0.0.0.0 and also using this ip to visit the page in your browser.