Expand description
Pod resolution from request host (Sprint 7 §6.3, ADR-057).
JSS parity: src/utils/url.js::urlToPathWithPod and the
subdomainsEnabled && podName branch in getPathFromRequest.
We lift the policy (“which pod owns this request?”) out of the
URL-to-filesystem mapper so that call sites (LDP, WAC, quota) can
consult it uniformly without each re-parsing the Host header.
§Model
PathResolver— default single-tenant behaviour. The URL path is the storage path verbatim andpodisNone.SubdomainResolver—<pod>.<base_domain>maps the first label to a pod identifier; bare<base_domain>returns the root pod (pod: None). Anything else (unknown subdomain tree) falls back to path-based semantics.
§Security
Pod labels are scrubbed of .. sequences with the same double-pass
algorithm JSS uses in urlToPathWithPod (.. is replaced until the
string stops changing, defeating the ....// bypass). Any resulting
empty or path-containing label is rejected by falling back to path
mode with pod: None.
Structs§
- Path
Resolver - Single-tenant / path-based resolver. Equivalent to JSS’s
subdomainsEnabled=falsemode: the URL path is the storage path and there is no notion of a per-host pod. - Resolved
Path - Result of resolving a request to a pod + storage path.
- Subdomain
Resolver - Subdomain-based resolver. Matches hosts of the form
<pod>.<base_domain>and yieldspod = Some(<pod>). The bare base domain yieldspod = None(root pod). Hosts outside the base domain tree fall back to path-based semantics.
Traits§
- PodResolver
- Policy that maps
(host, url_path)onto aResolvedPath.
Functions§
- is_
file_ like_ label - Sprint 11 (row 125/162, JSS PR #307
6d43e66): returntruewhen the hostname label looks like a filename that should be served from the base apex rather than promoted to a pod subdomain.