Documentation
¶
Overview ¶
Package loopback is THE rule for "this address is this machine": the one predicate every part of muster uses to treat plain http to the loopback interface as safe to use, and nothing else.
A request to http://localhost, http://127.0.0.1 (any of 127.0.0.0/8) or http://[::1] never leaves the machine, so a token sent over it is not in cleartext on any network, and browsers already treat such an origin as a secure context. Everything else that is plain http — a LAN address, a private range, a hostname that merely STARTS with "localhost" — is not this machine, and every caller keeps refusing it.
One rule, one place: the mirror's URL checks (internal/mirrorhost, cmd/muster-mirror), the CLI's doctor (cmd/muster) and the server's cookie policy (internal/api) all ask this package, so they cannot disagree about which addresses count.
🔴 NAMES ARE NOT RESOLVED. "localhost" is accepted by name (RFC 6761 reserves it for the loopback interface, and browsers treat it so); no other name is, however it resolves — not "localhost.", not "foo.localhost", not "localhost.example.com". An IP literal counts only when it IS a loopback address (an IPv4-mapped IPv6 one is unmapped first).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.