Skip to content

Commit

Permalink
Use idxPublic when extracting hostname from publicHost
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Trachtman committed Apr 24, 2017
1 parent 7d08d1e commit 9688eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Server.js
Expand Up @@ -417,7 +417,7 @@ Server.prototype.checkHost = function(headers) {
// also allow public hostname if provided
if(typeof this.publicHost === "string") {
const idxPublic = this.publicHost.indexOf(":");
const publicHostname = idxPublic >= 0 ? this.publicHost.substr(0, idx) : this.publicHost;
const publicHostname = idxPublic >= 0 ? this.publicHost.substr(0, idxPublic) : this.publicHost;
if(hostname === publicHostname) return true;
}

Expand Down

0 comments on commit 9688eea

Please sign in to comment.