mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-29 11:23:37 +00:00
remove legacy code to solve #58
Signed-off-by: Amolith <amolith@nixnet.xyz>
This commit is contained in:
parent
7182fecf5b
commit
e6eab33e2d
1 changed files with 0 additions and 10 deletions
|
@ -277,16 +277,6 @@ function extractNoteIdFromSocket (socket) {
|
||||||
}
|
}
|
||||||
if (socket.handshake.query && socket.handshake.query.noteId) {
|
if (socket.handshake.query && socket.handshake.query.noteId) {
|
||||||
return 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 {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue