summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/realtime.js10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index d85d728e..5dea47cc 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -277,16 +277,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
}