aldebaran-gate
Which address a request came to, and what to do before any route sees it. A site has one canonical address and may have old ones; a link or a person at an old address is sent on for good with the path and query kept, and a page still open there is left to finish.
| Item | What it is |
|---|---|
Canonical::new(host, old) | The site's address and its listed old ones, in a const. Refuses a host that has a scheme, a port or capitals, or is its own old address. |
Canonical::every_other_leads_to(origin) | For a canonical address known only at run time (a deploy's SITE_ORIGIN): every address that is neither it nor this machine's leads to it, so no name need be listed and a name nobody thought of cannot serve a second copy. |
of(host) | Canonical, Old, Local or Other: exact match, never a suffix. |
gate(&Asked, Status, Unrepeatable) | Pass, Moved { to, status } or Refused(why). Only a read that is not a socket and not a page's own request is moved; a POST at an old address is passed or told where the site is. |
Status | 301 or 308, closed. |
Switch | A deploy's on/off: exactly those words, unset is off, anything else is refused and runs as off. |