Merge pull request #1081 from baldurmen/local_files_tls

Don't show a TLS warning when loading locally
use-minification
Lorenz Hübschle-Schneider 6 years ago committed by GitHub
commit 48fb834e56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      js/glowingbear.js

@ -104,8 +104,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
})();
// Show a TLS warning if GB was loaded over an unencrypted connection,
// except for local instances (testing, cordova, or electron)
$scope.show_tls_warning = (window.location.protocol !== "https:") &&
// except for local instances (local files, testing, cordova, or electron)
$scope.show_tls_warning = (["https:", "file:"].indexOf(window.location.protocol) === -1) &&
(["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1) &&
!window.is_electron && !utils.isCordova();

Loading…
Cancel
Save