SocketIoConfig.coffee 737 B

1234567891011121314151617181920
  1. SocketIoRedisStore = require('socket.io/lib/stores/redis')
  2. module.exports =
  3. configure: (io)->
  4. io.configure ->
  5. io.enable('browser client minification')
  6. io.enable('browser client etag')
  7. # Fix for Safari 5 error of "Error during WebSocket handshake: location mismatch"
  8. # See http://answers.dotcloud.com/question/578/problem-with-websocket-over-ssl-in-safari-with
  9. io.set('match origin protocol', true)
  10. # gzip uses a Node 0.8.x method of calling the gzip program which
  11. # doesn't work with 0.6.x
  12. #io.enable('browser client gzip')
  13. io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'])
  14. io.set('log level', 1)
  15. io.configure 'production', ->
  16. io.set('log level', 1)