-
-
Save robertklep/9ffac71c18e113baf9db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
var io = require('socket.io').listen(app.listen(3033)); | |
app.use(express.static(__dirname)); | |
io.sockets.on('connection', function (socket) { | |
console.log('CONN', socket.handshake.headers); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
document.cookie = 'foo=bar' + Math.random(); | |
var socket = io.connect(); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONN { host: 'localhost:3033', | |
connection: 'keep-alive', | |
'cache-control': 'max-age=0', | |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36', | |
accept: '*/*', | |
referer: 'http://localhost:3033/', | |
'accept-encoding': 'gzip,deflate,sdch', | |
'accept-language': 'en-US,en;q=0.8', | |
cookie: 'foo=bar0.5201864070259035' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment