projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15ab9e0
)
engine.io fix for "forgetting" remoteAddress on websockets
author
Darren
<darren@darrenwhitlen.com>
Wed, 4 Jun 2014 14:49:37 +0000
(15:49 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Wed, 4 Jun 2014 14:49:37 +0000
(15:49 +0100)
server/weblistener.js
patch
|
blob
|
blame
|
history
diff --git
a/server/weblistener.js
b/server/weblistener.js
index 02bdca32d7a9829719afb82f3acdd9bd4a2622b4..fcaeb7cca4a112ca9a2f1417cd9f0d12b8e537b0 100644
(file)
--- a/
server/weblistener.js
+++ b/
server/weblistener.js
@@
-75,6
+75,11
@@
var WebListener = module.exports = function (web_config) {
this.ws = new engine.Server();
hs.on('upgrade', function(req, socket, head){
+ // engine.io can sometimes "loose" the clients remote address. Keep note of it
+ req.meta = {
+ remote_address: req.connection.remoteAddress
+ };
+
that.ws.handleUpgrade(req, socket, head);
});