Make sure legacy check returns true only on HTTPS (not like ftp or whatever)

I am not sure why it was expressed so convoluted before?

Found that in https://github.com/orgs/PrivateBin/discussions/1657
This commit is contained in:
rugk 2025-09-30 14:21:17 +02:00 committed by El RIDO
parent e3ec9dc963
commit 55472df906
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -106,8 +106,8 @@
return window.isSecureContext;
}
// HTTP is obviously insecure
if (window.location.protocol !== 'http:') {
// HTTPS is considered secure
if (window.location.protocol === 'https:') {
return true;
}