Module config

Source
Expand description

Links server configuration handling

The links redirector server currently accepts the following configuration options:

  • log_level - Tracing log level. Possible values: trace, debug, verbose, info, warn, error. Default info.
  • token - RPC API authentication token, should be long and random. Default [randomly generated string].
  • listeners - A list of listener addresses (strings) in the format of protocol:ip-address:port (see ListenAddress for details). Default http::, https::, grpc:[::1]:, and grpcs::.
  • statistics - A list of statistics categories to be collected (see statistics for details). Default redirect, basic, and protocol.
  • default_certificate - An optional TLS certificate/key source to be used for requests with an unknown/unrecognized domain names (see certificates for details). Default None.
  • certificates - A list of TLS certificate/key sources (see certificates for details). Default empty.
  • hsts - HTTP strict transport security setting. Possible values: disable, enable, includeSubDomains, preload. Default enable.
  • hsts_max_age - The HSTS max-age setting (in seconds). Default 63072000 (2 years).
  • https_redirect - Whether to redirect HTTP requests to HTTPS before the external redirect. Default false.
  • send_alt_svc - Whether to send the Alt-Svc HTTP header (Alt-Svc: h2=":443"; ma=31536000). Default false.
  • send_server - Whether to send the Server HTTP header (Server: hyperlinks/[VERSION]). Default true.
  • send_csp - Whether to send the Content-Security-Policy HTTP header. Default true.
  • store - The store backend type to use. See store documentation. Default memory.
  • store_config - Store backend configuration. Depends on the store backend used. Default empty.

Modules§

global đź”’
Global redirector server configuration.
partial đź”’
Links server configuration as seen by the user

Structs§

CertificateSource
The source of a certificate/key pair
CertificateWatcher
A watcher for updates to certificate sources
Config
Global configuration for the links redirector server. This is the more idiomatic, easier to use (in rust code), and shareable-across-threads version, which can be updated from a Partial.
ListenAddress
A listener’s address, with the protocol, ip address, and port.
Partial
Links redirector configuration as seen from the user’s perspective.
Redirector
Configuration of a redirector. Can be generated from a Config. This is separate from the actual Config, because it shouldn’t/can’t change during the course of processing a redirect.

Enums§

CertConfigUpdate
An update to certificate configuration
CertificateAcquisitionError
The error returned when getting a certificate/key pair fails
CertificateSourceType
The type of certificate source, for example certificate/key files, ACME, secret storage, etc.
DefaultCertificateSource
The source of the default certificate/key pair
Hsts
HTTP Strict Transport Security configuration settings and max-age in seconds for the links redirector.
IntoListenAddressError
The error returned by fallible conversions into ListenAddress, containing the invalid input value
IntoPartialError
The error returned by fallible conversions into a Partial
LogLevel
Log level, corresponding roughly to tracing’s, but with the addition of Verbose between debug and info.
PartialHsts
HSTS enabling options as seen from the user’s perspective.