Fix selfhosted secure/unsecure context bug (#234)

This commit is contained in:
Reckless_Satoshi 2022-09-09 15:27:03 +00:00 committed by GitHub
parent 645671265a
commit a0b1d277c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ class UnsafeAlert extends Component {
isSelfhosted(){
var http = new XMLHttpRequest();
http.open('HEAD', `http://${this.getHost()}/selfhosted`, false);
http.open('HEAD', `${location.protocol}//${this.getHost()}/selfhosted`, false);
http.send();
return http.status!=404;
}