Allow port in homeserver URL (#40)

Allow to use homeserver URL with port (e.g. ':443').
This commit is contained in:
Dirk Klimpel
2020-05-04 21:28:04 +02:00
committed by GitHub
parent 1002b6464a
commit 7f16f784f9

View File

@@ -103,7 +103,9 @@ const LoginPage = ({ theme }) => {
} else {
if (!values.base_url.match(/^(http|https):\/\//)) {
errors.base_url = translate("synapseadmin.auth.protocol_error");
} else if (!values.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+$/)) {
} else if (
!values.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?$/)
) {
errors.base_url = translate("synapseadmin.auth.url_error");
}
}