Open enuggetry opened 3 years ago
https://github.com/balderdashy/sails/issues/6494
See balderdashy/sails.io.js#66, but it is not yet merged into 0.11.7.
io.sails.url = "https://graingenes.org"
io.sails.path = "/jbconnect/socket.io"
io.sails.useCORSRouteToGetCookie = false
{
"code": 0,
"message": "Transport unknown"
}
Client Config:
<script type="text/javascript" src="https://graingenes.org/jbconnect/js/dependencies/sails.io.js"></script>
<script type="text/javascript">
io.sails.url = "https://graingenes.org"
io.sails.path = "/jbconnect/socket.io"
io.sails.useCORSRouteToGetCookie = false
io.sails.transports = ['websocket','polling']
</script>
{
"code": 3,
"message": "Bad request"
}
proxy_wstunnel module for apache:
https://stackoverflow.com/questions/17334319/setting-up-a-websocket-on-apache
sudo apache2ctl -M to list modules
Client seems to be connecting to server in this combination: https://graingenes.org/jbctest/index-test.html
sockets.js
transports: [ 'polling','websocket' ],
client side:
<script type="text/javascript" src="https://graingenes.org/jbconnect/js/dependencies/sails.io.js"></script>
<script type="text/javascript">
io.sails.url = "https://graingenes.org"
io.sails.path = "/jbconnect/socket.io"
io.sails.useCORSRouteToGetCookie = false
//io.sails.transports = ['polling','websocket']
io.sails.transports = ['polling']
</script>
https://serverfault.com/questions/829100/socket-io-with-sails-js-node-js-and-nginx-on-ssl-bad-gateway