我的ip local>
出错POST http://localhost.server.com/bosh 404 (Not Found)
sendFunc @ strophe.js:5662
_processRequest @ strophe.js:5677
_throttledRequestHandler @ strophe.js:5823
_connect @ strophe.js:5170
connect @ strophe.js:3051
(anonymous) @ Jchat.js:438
handle @ jquery.js:2693
(anonymous) @ jquery.js:2468
trigger @ jquery.js:2641
(anonymous) @ jquery.js:2919
each @ jquery.js:692
each @ jquery.js:155
trigger @ jquery.js:2918
Connect @ Jchat.js:271
(anonymous) @ jquery-ui.js:7387
handle @ jquery.js:2693
(anonymous) @ jquery.js:2468
外部访问>
我想在本地网络中访问Internet信息服务(IIS)中的一个应用程序的链接,但是当我想访问它时,我收到此错误
Failed to load http://localhost.server.com/bosh: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
我使用了这段代码
https://jasonrowe.com/2011/11/18/strophejs-ejabberd-iis-setup/
答案 0 :(得分:0)
错误是连接到客户端bosh,您必须将本地ip作为目标,然后再添加ip和域的文件主机。并在iis上写规则urlrewrite
示例:
192.168.0.1 localhost.server.com
和
BOSH_DOMAIN = "http://192.168.0.1:5280/http-bind"