Prefer isSecureContext if available
This commit is contained in:
@@ -4577,6 +4577,11 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||
*/
|
||||
function isInsecureConnection()
|
||||
{
|
||||
// use .isSecureContext if available
|
||||
if (window.isSecureContext === true || window.isSecureContext === false) {
|
||||
return !window.isSecureContext;
|
||||
}
|
||||
|
||||
const url = new URL(window.location);
|
||||
|
||||
// HTTP is obviously insecure
|
||||
|
||||
Reference in New Issue
Block a user