|
|
@@ -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;
|
|
|
}
|
|
|
|