mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
Prefer isSecureContext if available
This commit is contained in:
parent
a1b1efeae2
commit
e5974d4663
3 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue