diff options
author | Ciaran Gallagher <[email protected]> | 2019-12-04 17:02:31 +0000 |
---|---|---|
committer | Ciaran Gallagher <[email protected]> | 2019-12-04 17:02:31 +0000 |
commit | a9d950a581dd1326381ef021ac592f6b0cf390c9 (patch) | |
tree | 49445b33b1e1f197a3ce6e8ea528585e1082d8d8 /js | |
parent | 8a98f9fead4568671d7bd933059b6273b63dfa48 (diff) | |
download | pasta-a9d950a581dd1326381ef021ac592f6b0cf390c9.tar.gz pasta-a9d950a581dd1326381ef021ac592f6b0cf390c9.zip |
error option for http on https site
Diffstat (limited to 'js')
-rw-r--r-- | js/main.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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">×</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"> |