Skip to main content

split_name

Function split_name 

Source
pub(super) fn split_name(
    registry: &dyn Registry,
    reserved: &[String],
    name: &str,
) -> Result<(String, String), ApiError>
Expand description

Splits name into the label and the served zone it sits under.

The zone is the longest one the name ends with, so a name under a subzone lands in the subzone. What is left is exactly one label: a zone’s certificate covers one label under it, so a deeper name would never answer over TLS. A port on the name is ignored for the match: the zone decides it. The label may not be one of reserved, and the name may not be a zone’s own apex.