Update server.js #109
@@ -145,13 +145,13 @@ export default function(opt) {
|
|||||||
server.on('upgrade', (req, socket, head) => {
|
server.on('upgrade', (req, socket, head) => {
|
||||||
const hostname = req.headers.host;
|
const hostname = req.headers.host;
|
||||||
if (!hostname) {
|
if (!hostname) {
|
||||||
sock.destroy();
|
socket.destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const clientId = GetClientIdFromHostname(hostname);
|
const clientId = GetClientIdFromHostname(hostname);
|
||||||
if (!clientId) {
|
if (!clientId) {
|
||||||
sock.destroy();
|
socket.destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user