国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

node.js - 請問如何解決socket.io的跨域問題
漂亮男人
漂亮男人 2017-05-16 13:29:29
0
1
899

客戶端程式碼(client.html):

var socket = io.connect('localhost:80');

服務(wù)端(server.js):

io = require('socket.io').listen("80",{origins:'*'});

在本機可以正常運行,放到本機伺服器,提示

XMLHttpRequest cannot load http://localhost/socket.io/?E... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jess. dev' is therefore not allowed access. The response had HTTP status code 404.

#
漂亮男人
漂亮男人

全部回覆(1)
習(xí)慣沉默

http://stackoverflow.com/ques...

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板