webpack-dev-server 2.11.4 → 2.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Server.js +2 -2
- package/package.json +1 -1
package/lib/Server.js
CHANGED
|
@@ -31,7 +31,7 @@ const optionsSchema = require('./optionsSchema.json');
|
|
|
31
31
|
// eslint-disable-next-line global-require
|
|
32
32
|
const SockjsSession = require('sockjs/lib/transport').Session;
|
|
33
33
|
const decorateConnection = SockjsSession.prototype.decorateConnection;
|
|
34
|
-
SockjsSession.prototype.decorateConnection = function(req) {
|
|
34
|
+
SockjsSession.prototype.decorateConnection = function (req) {
|
|
35
35
|
decorateConnection.call(this, req);
|
|
36
36
|
const connection = this.connection;
|
|
37
37
|
if (connection.headers && !('origin' in connection.headers) && 'origin' in req.headers) {
|
|
@@ -541,7 +541,7 @@ Server.prototype.checkHost = function (headers, headerToCheck) {
|
|
|
541
541
|
// if hostHeader doesn't have scheme, add // for parsing.
|
|
542
542
|
/^(.+:)?\/\//.test(hostHeader) ? hostHeader : `//${hostHeader}`,
|
|
543
543
|
false,
|
|
544
|
-
true
|
|
544
|
+
true
|
|
545
545
|
).hostname;
|
|
546
546
|
|
|
547
547
|
// always allow requests with explicit IPv4 or IPv6-address.
|