Warn when assuming https
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bad 2020-10-21 19:43:21 +02:00
parent cf2c691585
commit c8351e8f0c

View file

@ -80,7 +80,10 @@ class Form extends ElemJS {
let currentAddress = homeserver.value
let ok = false
while (!ok) {
if (!currentAddress.match(/^https?:\/\//)) currentAddress = "https://" + currentAddress
if (!currentAddress.match(/^https?:\/\//)) {
console.warn(`${currentAddress} doesn't specify the protocol, assuming https`)
currentAddress = "https://" + currentAddress
}
currentAddress = currentAddress.replace(/\/*$/, "")
this.status(`Looking up homeserver... trying ${currentAddress}`)
try {