Documentation
¶
Overview ¶
Package relayurl applies NIP-42-flavored URL normalization for the purpose of comparing a client-supplied AUTH `relay` tag against the relay's configured Auth.RelayURL. NIP-42 says: "URL normalization techniques can be applied. For most cases just checking if the domain name is correct should be enough."
Two match modes are supported, picked by the operator:
ModeStrict (default): canonicalize scheme + host (lowercase, strip default ports) and a trailing-slash-stripped path. Path is significant. Safe for shared-host / multi-tenant deployments.
ModeHost: drop the path entirely. Any AUTH addressed at the right (canonicalized) scheme + host succeeds. Closer to the "domain name is correct should be enough" reading. Use this if clients in the wild append fingerprint suffixes to your URL and you don't share a host with another relay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.