Sanity check + comment why we add a leading dot

このコミットが含まれているのは:
Samantaz Fox 2022-04-09 20:04:42 +02:00
コミット 95d86ebf22
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: F42821059186176E
1個のファイルの変更2行の追加1行の削除

ファイルの表示

@ -222,7 +222,8 @@ function updateCookie(newVolume, newSpeed) {
var ipRegex = /^((\d+\.){3}\d+|[A-Fa-f0-9]*:[A-Fa-f0-9:]*:[A-Fa-f0-9:]+)$/;
var domainUsed = window.location.hostname;
if (!ipRegex.test(domainUsed) && domainUsed != 'localhost')
// Fix for a bug in FF where the leading dot in the FQDN is not ignored
if (domainUsed.charAt(0) != '.' && !ipRegex.test(domainUsed) && domainUsed != 'localhost')
domainUsed = '.' + window.location.hostname;
document.cookie = 'PREFS=' + cookieData + '; SameSite=Strict; path=/; domain=' +