aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorCiaran Gallagher <[email protected]>2019-12-04 17:02:31 +0000
committerCiaran Gallagher <[email protected]>2019-12-04 17:02:31 +0000
commita9d950a581dd1326381ef021ac592f6b0cf390c9 (patch)
tree49445b33b1e1f197a3ce6e8ea528585e1082d8d8 /js
parent8a98f9fead4568671d7bd933059b6273b63dfa48 (diff)
downloadpasta-a9d950a581dd1326381ef021ac592f6b0cf390c9.tar.gz
pasta-a9d950a581dd1326381ef021ac592f6b0cf390c9.zip
error option for http on https site
Diffstat (limited to 'js')
-rw-r--r--js/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
index 534617b..4a143f2 100644
--- a/js/main.js
+++ b/js/main.js
@@ -79,6 +79,16 @@ function connectToPlex() {
</button>
</div>`);
}
+ else if ((location.protocol == 'https:') && (plexUrl.indexOf('http:') > -1)) {
+ console.log("Trying to use http over a https site");
+ $("#authWarningText").html(`<div class="alert alert-warning alert-dismissible fade show mt-3" role="alert">
+ <strong>Warning:</strong> Error - You are trying to access a http server via the site in https. Please access your server via https, or load this site \
+ over https by <a href="http://www.pastatool.com">clicking here</a>.
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>`);
+ }
else {
console.log("Unkown error, most likely bad URL / IP");
$("#authWarningText").html(`<div class="alert alert-warning alert-dismissible fade show mt-3" role="alert">