@web/dev-server-core
Advanced tools
Comparing version 0.3.17 to 0.3.18
@@ -38,3 +38,3 @@ "use strict"; | ||
port: this.config.port, | ||
// in case of localhost the host should be undefined, otherwise some browsers connect | ||
// in case of localhost the host should be undefined, otherwise some browsers | ||
// connect to it via local network. for example safari on browserstack | ||
@@ -41,0 +41,0 @@ host: ['localhost', '127.0.0.1'].includes(this.config.hostname) |
@@ -44,5 +44,7 @@ "use strict"; | ||
server.on('upgrade', (request, socket, head) => { | ||
this.webSocketServer.handleUpgrade(request, socket, head, ws => { | ||
this.webSocketServer.emit('connection', ws, request); | ||
}); | ||
if (request.url === this.webSocketServer.options.path) { | ||
this.webSocketServer.handleUpgrade(request, socket, head, ws => { | ||
this.webSocketServer.emit('connection', ws, request); | ||
}); | ||
} | ||
}); | ||
@@ -49,0 +51,0 @@ } |
{ | ||
"name": "@web/dev-server-core", | ||
"version": "0.3.17", | ||
"version": "0.3.18", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -43,3 +43,3 @@ import Koa from 'koa'; | ||
port: this.config.port, | ||
// in case of localhost the host should be undefined, otherwise some browsers connect | ||
// in case of localhost the host should be undefined, otherwise some browsers | ||
// connect to it via local network. for example safari on browserstack | ||
@@ -46,0 +46,0 @@ host: ['localhost', '127.0.0.1'].includes(this.config.hostname) |
@@ -51,5 +51,7 @@ import { Server } from 'net'; | ||
server.on('upgrade', (request, socket, head) => { | ||
this.webSocketServer.handleUpgrade(request, socket, head, ws => { | ||
this.webSocketServer.emit('connection', ws, request); | ||
}); | ||
if (request.url === this.webSocketServer.options.path) { | ||
this.webSocketServer.handleUpgrade(request, socket, head, ws => { | ||
this.webSocketServer.emit('connection', ws, request); | ||
}); | ||
} | ||
}); | ||
@@ -56,0 +58,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5666
292133
180