Make hostname matching case insensitive
This commit is contained in:
parent
2dabbc0969
commit
34ef03a43c
|
@ -17,10 +17,10 @@ function wildHostMatches(wildHost, hostInstance) {
|
||||||
if (wildHost[0] === "*") {
|
if (wildHost[0] === "*") {
|
||||||
//Return if everything after the first . matches
|
//Return if everything after the first . matches
|
||||||
//TODO: what happens if I'm dumb and enter *ww.example.com
|
//TODO: what happens if I'm dumb and enter *ww.example.com
|
||||||
return wildHost.slice(wildHost.indexOf(".")) === hostInstance.slice(hostInstance.indexOf("."))
|
return wildHost.toLowerCase().slice(wildHost.indexOf(".")) === hostInstance.toLowerCase().slice(hostInstance.indexOf("."))
|
||||||
}else {
|
}else {
|
||||||
//If there's no wildcard, just return if they match
|
//If there's no wildcard, just return if they match
|
||||||
return wildHost === hostInstance;
|
return wildHost.toLowerCase() === hostInstance.toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue