Socket.io + PhoneGap

前端 未结 3 1947

When I try to use Socket.IO with PhoneGap I get this error:

(on iOS where socket.io should be supported)

Origin null is not allowed by Access

3条回答
  •  独厮守ぢ
    2020-11-29 00:26

    So if the webpage opened with the file:// url protocol in PhoneGap was to send the header "Access-Control-Allow-Origin: *" -- theoretically it should all work with socket.io?

    (it's possible to do so through NSURLProtocol, but I didn't want to go down this rabbit hole without knowing the fix)

提交回复
热议问题