Bugfix: Image previews not loading when not serving Converse locally

Fixes #2634
This commit is contained in:
JC Brand 2021-09-06 19:57:57 +02:00
parent 9b4ce0011e
commit 8854f67c20
3 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 8.0.1 (Unreleased)
- #2634: Image previews not loading when not serving Converse locally
## 8.0.0 (2021-09-03)
- Requires Node 12 or above

1
package-lock.json generated
View File

@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "converse.js",
"version": "8.0.0",
"license": "MPL-2.0",
"dependencies": {

View File

@ -6,7 +6,7 @@ function checkTLS (uri) {
const uri_protocol = uri.protocol().toLowerCase();
return (
window.location.protocol === 'http:' ||
(window.location.protocol === 'https:' && ['http', 'aesgcm'].includes(uri_protocol))
(window.location.protocol === 'https:' && ['https', 'aesgcm'].includes(uri_protocol))
);
}