Skip to content

Commit 9688eea

Browse files
author
Aaron Trachtman
committed
Use idxPublic when extracting hostname from publicHost
1 parent 7d08d1e commit 9688eea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Server.prototype.checkHost = function(headers) {
417417
// also allow public hostname if provided
418418
if(typeof this.publicHost === "string") {
419419
const idxPublic = this.publicHost.indexOf(":");
420-
const publicHostname = idxPublic >= 0 ? this.publicHost.substr(0, idx) : this.publicHost;
420+
const publicHostname = idxPublic >= 0 ? this.publicHost.substr(0, idxPublic) : this.publicHost;
421421
if(hostname === publicHostname) return true;
422422
}
423423

0 commit comments

Comments
 (0)