Don't show a TLS warning when loading locally

This commit is contained in:
Louis-Philippe Véronneau 2019-12-07 23:59:04 -05:00
parent 5c401b6923
commit b78952cd3b
No known key found for this signature in database
GPG Key ID: 7AEAC4EC6AAA0A97
1 changed files with 2 additions and 2 deletions

View File

@ -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();