1# aldebaran-gate
2
3Which address a request came to, and what to do before any route sees it.
4A site has one canonical address and may have old ones; a link or a person
5at an old address is sent on for good with the path and query kept, and a
6page still open there is left to finish.
7
8| Item | What it is |
9|---|---|
10| `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. |
11| `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. |
12| `of(host)` | `Canonical`, `Old`, `Local` or `Other`: exact match, never a suffix. |
13| `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. |
14| `Status` | `301` or `308`, closed. |
15| `Switch` | A deploy's `on`/`off`: exactly those words, unset is off, anything else is refused and runs as off. |