Allow .test domains during bootstrap
This commit is contained in:
@@ -121,7 +121,7 @@ pub(crate) async fn bootstrap_set(
|
|||||||
// Validate domain name and hostname
|
// Validate domain name and hostname
|
||||||
let server_hostname = bootstrap.server_hostname.trim().to_lowercase();
|
let server_hostname = bootstrap.server_hostname.trim().to_lowercase();
|
||||||
let domain_name = bootstrap.default_domain.trim().to_lowercase();
|
let domain_name = bootstrap.default_domain.trim().to_lowercase();
|
||||||
if psl::domain_str(&server_hostname).is_none() {
|
if psl::domain_str(&server_hostname).is_none() && !server_hostname.ends_with(".test") {
|
||||||
set.response.not_updated.append(
|
set.response.not_updated.append(
|
||||||
id,
|
id,
|
||||||
SetError::invalid_properties()
|
SetError::invalid_properties()
|
||||||
@@ -130,7 +130,7 @@ pub(crate) async fn bootstrap_set(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if psl::domain_str(&domain_name).is_none() {
|
if psl::domain_str(&domain_name).is_none() && !domain_name.ends_with(".test") {
|
||||||
set.response.not_updated.append(
|
set.response.not_updated.append(
|
||||||
id,
|
id,
|
||||||
SetError::invalid_properties()
|
SetError::invalid_properties()
|
||||||
|
|||||||
Reference in New Issue
Block a user