Make hostname matching case insensitive

This commit is contained in:
MatthiasSaihttam 2021-11-15 10:44:52 -05:00
parent 2dabbc0969
commit 34ef03a43c
1 changed files with 2 additions and 2 deletions

View File

@ -17,10 +17,10 @@ function wildHostMatches(wildHost, hostInstance) {
if (wildHost[0] === "*") {
//Return if everything after the first . matches
//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 {
//If there's no wildcard, just return if they match
return wildHost === hostInstance;
return wildHost.toLowerCase() === hostInstance.toLowerCase();
}
}