summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/realtime.js11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index d85d728e..ec99707e 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -3,7 +3,6 @@
// external modules
var cookie = require('cookie')
var cookieParser = require('cookie-parser')
-var url = require('url')
var async = require('async')
var randomcolor = require('randomcolor')
var Chance = require('chance')
@@ -277,16 +276,6 @@ function extractNoteIdFromSocket (socket) {
}
if (socket.handshake.query && socket.handshake.query.noteId) {
return socket.handshake.query.noteId
- } else if (socket.handshake.headers) {
- // this part is only for backward compatibility only; current code
- // should be using noteId query parameter instead.
- var referer = socket.handshake.headers.referer
- if (!referer) {
- return false
- }
- var hostUrl = url.URL.parse(referer)
- var noteId = config.urlPath ? hostUrl.pathname.slice(config.urlPath.length + 1, hostUrl.pathname.length).split('/')[1] : hostUrl.pathname.split('/')[1]
- return noteId
} else {
return false
}