balderdashy / sails.io.js

Browser SDK for communicating w/ Sails via sockets
https://sailsjs.com/documentation/reference/web-sockets/socket-client
183 stars 118 forks source link

Changed socket header in README instructions for CSRF. #119

Closed rdtscp closed 5 years ago

rdtscp commented 7 years ago

Script says that websocket request headers are within io.sails.headers, however this would not apply for me, so i set io.socket.headers.

mikermcneil commented 7 years ago

Hey @acwilson96, thanks for looking into this. The reasoning here is that io.sails should be automatically merged as default config for every new socket, including the initial autoconnecting socket (io.socket). More background on that: https://next.sailsjs.com/documentation/reference/web-sockets/socket-client/io-sails