Expand description
Path resolution logic for the mbr server.
This module contains pure functions for determining what resource to serve
based on a URL path. By keeping this logic separate from I/O, it becomes
easily testable. Every filesystem question it asks goes through a
Vault: stat for the probes, resolve_under for containment.
Structs§
- Owned
Path Resolver Config - Owned counterpart of
PathResolverConfig. - Path
Resolver Config - Configuration for path resolution.
Enums§
- Resolved
Path - The result of resolving a URL path to a resource.
Functions§
- canonical_
page_ redirect - Decides whether a request that resolved to a markdown page arrived at a non-canonical URL, and if so what to redirect to.
- normalize_
link_ target - Normalizes an authored link target (href) into the request-path form that
resolve_request_pathexpects. - resolve_
request_ path - Resolves a URL path to determine what resource should be served.
- strip_
trailing_ separator - Strips trailing path separator(s) from a path.