Skip to content

Commit 4455f4c

Browse files
committed
gw: Auto strip wildcard prefix from UI
1 parent 0c6b262 commit 4455f4c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

gateway/src/admin_service.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,15 @@ fn proto_to_zt_domain_config(
719719
.context("specified dns credential not found")?;
720720
}
721721

722+
// Strip wildcard prefix if user entered it
723+
let domain = proto
724+
.domain
725+
.strip_prefix("*.")
726+
.unwrap_or(&proto.domain)
727+
.to_string();
728+
722729
Ok(ZtDomainConfig {
723-
domain: proto.domain.clone(),
730+
domain,
724731
dns_cred_id,
725732
port: proto.port.try_into().context("port out of range")?,
726733
node: proto.node,

0 commit comments

Comments
 (0)