removing exceptions - in these cases server admins can opt to disable the warning message in the configuration

This commit is contained in:
El RIDO 2019-06-22 08:39:46 +02:00
parent 57bd65225d
commit d0365faf76
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
3 changed files with 3 additions and 22 deletions

View file

@ -4581,31 +4581,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
if (window.isSecureContext === true || window.isSecureContext === false) {
return !window.isSecureContext;
}
const url = new URL(window.location);
const url = new URL(window.location);
// HTTP is obviously insecure
if (url.protocol !== 'http:') {
return false;
}
// filter out actually secure connections over HTTP
if (
url.hostname.endsWith('.onion') ||
url.hostname.endsWith('.i2p')
) {
return false;
}
// whitelist localhost for development
if (
url.hostname === 'localhost' ||
url.hostname === '127.0.0.1'
) {
return false;
}
// totally INSECURE http protocol!
return true;
}