File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 28
28
"passport-facebook" : " latest" ,<% } %><% if (filters.twitterAuth) { %>
29
29
"passport-twitter" : " latest" ,<% } %><% if (filters.googleAuth) { %>
30
30
"passport-google-oauth" : " latest" ,<% } %><% if (filters.socketio) { %>
31
- "socket.io" : " ^1.0.6 " ,
32
- "socket.io-client" : " ^1.0.6 " ,
33
- "socketio-jwt" : " ^3.0 .0" ,<% } %>
31
+ "socket.io" : " ^1.3.5 " ,
32
+ "socket.io-client" : " ^1.3.5 " ,
33
+ "socketio-jwt" : " ^4.2 .0" ,<% } %>
34
34
"serve-favicon" : " ~2.0.1"
35
35
},
36
36
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ module.exports = function(socketio) {
27
27
//
28
28
// ex: DEBUG: "http*,socket.io:socket"
29
29
30
- // We can authenticate socket.io users and access their token through socket.handshake. decoded_token
30
+ // We can authenticate socket.io users and access their token through socket.decoded_token
31
31
//
32
32
// 1. You will need to send the token in `client/components/socket/socket.service.js`
33
33
//
@@ -38,10 +38,8 @@ module.exports = function(socketio) {
38
38
// }));
39
39
40
40
socketio . on ( 'connection' , function ( socket ) {
41
- socket . address =
42
- socket . handshake . address !== null ?
43
- socket . handshake . address . address + ':' + socket . handshake . address . port :
44
- process . env . DOMAIN ;
41
+ socket . address = socket . request . connection . remoteAddress +
42
+ ':' + socket . request . connection . remotePort ;
45
43
46
44
socket . connectedAt = new Date ( ) ;
47
45
You can’t perform that action at this time.
0 commit comments