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 GitHub
parent f03f2bf28d
commit a0c0d3d37b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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