From a0b1d277c61d2f5d52c051569b400bba26974b11 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:27:03 +0000 Subject: [PATCH] Fix selfhosted secure/unsecure context bug (#234) --- frontend/src/components/UnsafeAlert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UnsafeAlert.js b/frontend/src/components/UnsafeAlert.js index eda6b674..3c70f261 100644 --- a/frontend/src/components/UnsafeAlert.js +++ b/frontend/src/components/UnsafeAlert.js @@ -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; }