Warn when assuming https
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bad 2020-10-21 19:43:21 +02:00
parent cf2c691585
commit c8351e8f0c
1 changed files with 4 additions and 1 deletions

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 {