bdy 1.9.30-stage → 1.9.31-dev
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/distTs/package.json
CHANGED
|
@@ -56,7 +56,8 @@ class ServerHttp1 extends events_1.default {
|
|
|
56
56
|
req.end();
|
|
57
57
|
}
|
|
58
58
|
checkHostHeader(req, res, host) {
|
|
59
|
-
|
|
59
|
+
const headerHost = (req.headers.host || '').split(':')[0];
|
|
60
|
+
if (headerHost === host)
|
|
60
61
|
return true;
|
|
61
62
|
else {
|
|
62
63
|
res.statusCode = 421;
|
|
@@ -56,7 +56,8 @@ class ServerHttp2 extends events_1.default {
|
|
|
56
56
|
req.end();
|
|
57
57
|
}
|
|
58
58
|
checkHostHeader(req, res, host) {
|
|
59
|
-
|
|
59
|
+
const headerHost = (req.headers[':authority'] || '').split(':')[0];
|
|
60
|
+
if (headerHost === host)
|
|
60
61
|
return true;
|
|
61
62
|
else {
|
|
62
63
|
res.statusCode = 421;
|