catalogue: composeName handles the apex label '@' (bare public domain)
An empty label composed nothing, so a module served at the bare domain (a node's own site) had to keep a full name — the one route the label model could not express. The zone-file convention '@' now composes to the public domain itself, no leading dot, so the apex is a label like any other. Test added. Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
This commit is contained in:
@@ -596,6 +596,13 @@ func composeName(values map[string]any, publicDomain string) {
|
||||
if !ok || strings.TrimSpace(label) == "" {
|
||||
return
|
||||
}
|
||||
if strings.TrimSpace(label) == "@" {
|
||||
// The apex: a module served at the bare public domain, no subdomain — the zone-file
|
||||
// convention `@`. Composes to the domain itself, so a node's own site is a label like any
|
||||
// other rather than the one route that must still carry a full name.
|
||||
values["name"] = publicDomain
|
||||
return
|
||||
}
|
||||
values["name"] = strings.TrimSpace(label) + "." + publicDomain
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user