Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:sockjs/sockjs-node

  • Loading branch information...
commit b2761c9c4f3aec9e74d5e63f3a576584b2094015 2 parents 80f8fdb + 296a921
@majek majek authored
Showing with 6 additions and 1 deletion.
  1. +1 −1  src/sockjs.coffee
  2. +5 −0 src/transport.coffee
View
2  src/sockjs.coffee
@@ -142,7 +142,7 @@ exports.createServer = (options) ->
return new Server(options)
exports.listen = (http_server, options) ->
- srv = createServer(options)
+ srv = exports.createServer(options)
if http_server
srv.installHandlers(http_server)
return srv
View
5 src/transport.coffee
@@ -78,6 +78,11 @@ class Session
@recv = recv
@recv.session = @
+ # Store the last known address.
+ unless socket = @recv.connection
+ socket = @recv.response.connection
+ @connection.remoteAddress = socket.remoteAddress
@dvv
dvv added a note

accomodation for load balancers is meant to be external to SockJS, right? I mean X-Forwarded-For: and such

@majek Owner
majek added a note

See #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
# first, send the open frame
if @readyState is Transport.CONNECTING
@recv.doSendFrame('o')
Please sign in to comment.
Something went wrong with that request. Please try again.