pub struct Config {}Implementations§
Source§impl Config
impl Config
pub const RWS_CONFIG_IP: &'static str = "RWS_CONFIG_IP"
Sourcepub const RWS_CONFIG_IP_DEFAULT_VALUE: &'static str = "0.0.0.0"
pub const RWS_CONFIG_IP_DEFAULT_VALUE: &'static str = "0.0.0.0"
Default is 0.0.0.0 so the server is reachable inside containers and K8s pods.
For local development you can override to 127.0.0.1 via env var or config file.
Sourcepub const RWS_CONFIG_LOG_FORMAT: &'static str = "RWS_CONFIG_LOG_FORMAT"
pub const RWS_CONFIG_LOG_FORMAT: &'static str = "RWS_CONFIG_LOG_FORMAT"
Log format: "combined" (default, Combined Log Format) or "json" (structured JSON).
pub const RWS_CONFIG_LOG_FORMAT_DEFAULT_VALUE: &'static str = "json"
pub const RWS_CONFIG_PORT: &'static str = "RWS_CONFIG_PORT"
pub const RWS_CONFIG_PORT_DEFAULT_VALUE: &'static str = "7878"
pub const RWS_CONFIG_THREAD_COUNT: &'static str = "RWS_CONFIG_THREAD_COUNT"
pub const RWS_CONFIG_THREAD_COUNT_DEFAULT_VALUE: &'static str = "200"
pub const RWS_CONFIG_CORS_ALLOW_ALL: &'static str = "RWS_CONFIG_CORS_ALLOW_ALL"
pub const RWS_CONFIG_CORS_ALLOW_ALL_DEFAULT_VALUE: &'static str = "false"
pub const RWS_CONFIG_CORS_ALLOW_ORIGINS: &'static str = "RWS_CONFIG_CORS_ALLOW_ORIGINS"
pub const RWS_CONFIG_CORS_ALLOW_ORIGINS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_CORS_ALLOW_CREDENTIALS: &'static str = "RWS_CONFIG_CORS_ALLOW_CREDENTIALS"
pub const RWS_CONFIG_CORS_ALLOW_CREDENTIALS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_CORS_ALLOW_HEADERS: &'static str = "RWS_CONFIG_CORS_ALLOW_HEADERS"
pub const RWS_CONFIG_CORS_ALLOW_HEADERS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_CORS_ALLOW_METHODS: &'static str = "RWS_CONFIG_CORS_ALLOW_METHODS"
pub const RWS_CONFIG_CORS_ALLOW_METHODS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_CORS_EXPOSE_HEADERS: &'static str = "RWS_CONFIG_CORS_EXPOSE_HEADERS"
pub const RWS_CONFIG_CORS_EXPOSE_HEADERS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_CORS_MAX_AGE: &'static str = "RWS_CONFIG_CORS_MAX_AGE"
pub const RWS_CONFIG_CORS_MAX_AGE_DEFAULT_VALUE: &'static str = "86400"
pub const RWS_CONFIG_REQUEST_ALLOCATION_SIZE_IN_BYTES: &'static str = "RWS_CONFIG_REQUEST_ALLOCATION_SIZE_IN_BYTES"
pub const RWS_CONFIG_REQUEST_ALLOCATION_SIZE_IN_BYTES_DEFAULT_VALUE: &'static str = "10000"
Sourcepub const RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES: &'static str = "RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES"
pub const RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES: &'static str = "RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES"
Maximum accepted request body size in bytes, checked against Content-Length
before any body bytes are read off the socket. 0 (the default) means
unlimited — this is opt-in, not a default-on behavior change. Requests whose
declared body exceeds this get 413 Payload Too Large and the connection is
closed (not kept alive), since bytes the server chose not to read are still
queued on the client’s side of the socket.
pub const RWS_CONFIG_MAX_BODY_SIZE_IN_BYTES_DEFAULT_VALUE: &'static str = "0"
Sourcepub const RWS_CONFIG_SPA_FALLBACK: &'static str = "RWS_CONFIG_SPA_FALLBACK"
pub const RWS_CONFIG_SPA_FALLBACK: &'static str = "RWS_CONFIG_SPA_FALLBACK"
Serve this file (e.g. "index.html") for a GET/HEAD request that doesn’t
match any real file/directory, instead of 404 — the standard client-side-router
(“SPA”) fallback pattern needed for deep links in a React Router / Vue Router /
etc. app. Empty (default) disables it entirely. See
crate::app::controller::static_resource for the matching heuristic (skips
paths that look like a missed static asset, i.e. the last segment has a .).
pub const RWS_CONFIG_SPA_FALLBACK_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_SPA_FALLBACK_EXCLUDE_PREFIXES: &'static str = "RWS_CONFIG_SPA_FALLBACK_EXCLUDE_PREFIXES"
pub const RWS_CONFIG_SPA_FALLBACK_EXCLUDE_PREFIXES: &'static str = "RWS_CONFIG_SPA_FALLBACK_EXCLUDE_PREFIXES"
Comma-separated path prefixes (e.g. "/api,/healthz") that never receive the
SPA fallback even when RWS_CONFIG_SPA_FALLBACK is set — so a real API 404
isn’t silently rewritten into a 200. Empty (default) excludes nothing.
pub const RWS_CONFIG_SPA_FALLBACK_EXCLUDE_PREFIXES_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_TLS_CERT_FILE: &'static str = "RWS_CONFIG_TLS_CERT_FILE"
pub const RWS_CONFIG_TLS_CERT_FILE_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_TLS_KEY_FILE: &'static str = "RWS_CONFIG_TLS_KEY_FILE"
pub const RWS_CONFIG_TLS_KEY_FILE_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_TLS_CLIENT_CA_FILE: &'static str = "RWS_CONFIG_TLS_CLIENT_CA_FILE"
pub const RWS_CONFIG_TLS_CLIENT_CA_FILE: &'static str = "RWS_CONFIG_TLS_CLIENT_CA_FILE"
Path to a PEM-encoded CA certificate used to verify client certificates (mTLS). When set, the TLS handshake requires a valid client certificate signed by this CA. Connections without a valid cert are rejected at the TLS layer (before any HTTP processing).
pub const RWS_CONFIG_TLS_CLIENT_CA_FILE_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_TEMPLATE_DIR: &'static str = "RWS_CONFIG_TEMPLATE_DIR"
pub const RWS_CONFIG_TEMPLATE_DIR: &'static str = "RWS_CONFIG_TEMPLATE_DIR"
Directory containing Tera HTML templates (default: "templates"). Requires tera feature.
pub const RWS_CONFIG_TEMPLATE_DIR_DEFAULT_VALUE: &'static str = "templates"
Sourcepub const RWS_CONFIG_HTTP_REDIRECT_PORT: &'static str = "RWS_CONFIG_HTTP_REDIRECT_PORT"
pub const RWS_CONFIG_HTTP_REDIRECT_PORT: &'static str = "RWS_CONFIG_HTTP_REDIRECT_PORT"
When non-empty, a plain-HTTP listener on this port redirects all requests to HTTPS.
Set to e.g. "80" when running on standard ports. Requires TLS to be configured.
pub const RWS_CONFIG_HTTP_REDIRECT_PORT_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_DOMAINS: &'static str = "RWS_CONFIG_ACME_DOMAINS"
pub const RWS_CONFIG_ACME_DOMAINS: &'static str = "RWS_CONFIG_ACME_DOMAINS"
Comma-separated list of domain names to obtain a certificate for.
Setting this activates ACME at startup. Example: "example.com,www.example.com"
pub const RWS_CONFIG_ACME_DOMAINS_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_EMAIL: &'static str = "RWS_CONFIG_ACME_EMAIL"
pub const RWS_CONFIG_ACME_EMAIL: &'static str = "RWS_CONFIG_ACME_EMAIL"
Contact email sent to the CA. Recommended but not required.
pub const RWS_CONFIG_ACME_EMAIL_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_STAGING: &'static str = "RWS_CONFIG_ACME_STAGING"
pub const RWS_CONFIG_ACME_STAGING: &'static str = "RWS_CONFIG_ACME_STAGING"
Set to "true" to use the Let’s Encrypt staging environment (for testing).
pub const RWS_CONFIG_ACME_STAGING_DEFAULT_VALUE: &'static str = "false"
Sourcepub const RWS_CONFIG_ACME_DIRECTORY: &'static str = "RWS_CONFIG_ACME_DIRECTORY"
pub const RWS_CONFIG_ACME_DIRECTORY: &'static str = "RWS_CONFIG_ACME_DIRECTORY"
Custom ACME directory URL. Defaults to Let’s Encrypt production.
pub const RWS_CONFIG_ACME_DIRECTORY_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_CERT_PATH: &'static str = "RWS_CONFIG_ACME_CERT_PATH"
pub const RWS_CONFIG_ACME_CERT_PATH: &'static str = "RWS_CONFIG_ACME_CERT_PATH"
Where to write the provisioned certificate chain (PEM). Defaults to RWS_CONFIG_TLS_CERT_FILE,
or cert.pem in the working directory when that is empty too.
pub const RWS_CONFIG_ACME_CERT_PATH_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_KEY_PATH: &'static str = "RWS_CONFIG_ACME_KEY_PATH"
pub const RWS_CONFIG_ACME_KEY_PATH: &'static str = "RWS_CONFIG_ACME_KEY_PATH"
Where to write the certificate’s private key (PEM). Defaults to RWS_CONFIG_TLS_KEY_FILE,
or key.pem in the working directory when that is empty too.
pub const RWS_CONFIG_ACME_KEY_PATH_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_CHALLENGE_PORT: &'static str = "RWS_CONFIG_ACME_CHALLENGE_PORT"
pub const RWS_CONFIG_ACME_CHALLENGE_PORT: &'static str = "RWS_CONFIG_ACME_CHALLENGE_PORT"
Port for the temporary HTTP-01 challenge server (default 80). Must be reachable from the internet on port 80. Not used with DNS-01.
pub const RWS_CONFIG_ACME_CHALLENGE_PORT_DEFAULT_VALUE: &'static str = "80"
Sourcepub const RWS_CONFIG_ACME_RENEW_BEFORE_DAYS: &'static str = "RWS_CONFIG_ACME_RENEW_BEFORE_DAYS"
pub const RWS_CONFIG_ACME_RENEW_BEFORE_DAYS: &'static str = "RWS_CONFIG_ACME_RENEW_BEFORE_DAYS"
Renew when fewer than this many days remain on the certificate (default 30).
Sourcepub const RWS_CONFIG_ACME_RENEW_BEFORE_DAYS_DEFAULT_VALUE: &'static str = ""
pub const RWS_CONFIG_ACME_RENEW_BEFORE_DAYS_DEFAULT_VALUE: &'static str = ""
Empty: renew at two-thirds of the certificate’s lifetime (or the CA’s renewal window), not a fixed number of days before expiry.
pub const RWS_CONFIG_ACME_PROFILE: &'static str = "RWS_CONFIG_ACME_PROFILE"
Sourcepub const RWS_CONFIG_ACME_ACCOUNT_KEY_PATH: &'static str = "RWS_CONFIG_ACME_ACCOUNT_KEY_PATH"
pub const RWS_CONFIG_ACME_ACCOUNT_KEY_PATH: &'static str = "RWS_CONFIG_ACME_ACCOUNT_KEY_PATH"
Path to persist the ACME account key between restarts (default acme_account.key).
pub const RWS_CONFIG_ACME_ACCOUNT_KEY_PATH_DEFAULT_VALUE: &'static str = "acme_account.key"
Sourcepub const RWS_CONFIG_ACME_CA_FILE: &'static str = "RWS_CONFIG_ACME_CA_FILE"
pub const RWS_CONFIG_ACME_CA_FILE: &'static str = "RWS_CONFIG_ACME_CA_FILE"
PEM file of extra root CAs to trust when talking to the ACME directory, on top of the public Web PKI roots — for a private ACME CA (step-ca, Pebble, an internal Boulder). Empty means public roots only.
pub const RWS_CONFIG_ACME_CA_FILE_DEFAULT_VALUE: &'static str = ""
Sourcepub const RWS_CONFIG_ACME_RENEW_CHECK_INTERVAL_SECS: &'static str = "RWS_CONFIG_ACME_RENEW_CHECK_INTERVAL_SECS"
pub const RWS_CONFIG_ACME_RENEW_CHECK_INTERVAL_SECS: &'static str = "RWS_CONFIG_ACME_RENEW_CHECK_INTERVAL_SECS"
Seconds between certificate-expiry checks in the renewal loop (default 12h). After a failed renewal the next attempt comes after at most one hour.
pub const RWS_CONFIG_ACME_RENEW_CHECK_INTERVAL_SECS_DEFAULT_VALUE: &'static str = "43200"
Sourcepub const RWS_CONFIG_ACME_CHALLENGE: &'static str = "RWS_CONFIG_ACME_CHALLENGE"
pub const RWS_CONFIG_ACME_CHALLENGE: &'static str = "RWS_CONFIG_ACME_CHALLENGE"
How to prove control of the domains: http-01 (default),
tls-alpn-01 (on the HTTPS port) or dns-01 (needed for wildcards).
Sourcepub const RWS_CONFIG_ACME_DNS_PROVIDER: &'static str = "RWS_CONFIG_ACME_DNS_PROVIDER"
pub const RWS_CONFIG_ACME_DNS_PROVIDER: &'static str = "RWS_CONFIG_ACME_DNS_PROVIDER"
DNS-01: rfc2136 (a DNS UPDATE to RWS_CONFIG_ACME_DNS_SERVER) or
exec (a program that adds and removes the record).
Sourcepub const RWS_CONFIG_ACME_DNS_SERVER: &'static str = "RWS_CONFIG_ACME_DNS_SERVER"
pub const RWS_CONFIG_ACME_DNS_SERVER: &'static str = "RWS_CONFIG_ACME_DNS_SERVER"
DNS-01 rfc2136: the primary server, host[:port] (port 53).
Sourcepub const RWS_CONFIG_ACME_DNS_ZONE: &'static str = "RWS_CONFIG_ACME_DNS_ZONE"
pub const RWS_CONFIG_ACME_DNS_ZONE: &'static str = "RWS_CONFIG_ACME_DNS_ZONE"
DNS-01: the zone holding the records; found by SOA lookup when empty.
Sourcepub const RWS_CONFIG_ACME_DNS_TSIG_KEY: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_KEY"
pub const RWS_CONFIG_ACME_DNS_TSIG_KEY: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_KEY"
DNS-01 rfc2136: the TSIG key name the server knows.
Sourcepub const RWS_CONFIG_ACME_DNS_TSIG_SECRET: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_SECRET"
pub const RWS_CONFIG_ACME_DNS_TSIG_SECRET: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_SECRET"
DNS-01 rfc2136: the TSIG secret, base64 — never printed.
Sourcepub const RWS_CONFIG_ACME_DNS_TSIG_ALGORITHM: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_ALGORITHM"
pub const RWS_CONFIG_ACME_DNS_TSIG_ALGORITHM: &'static str = "RWS_CONFIG_ACME_DNS_TSIG_ALGORITHM"
DNS-01 rfc2136: hmac-sha256 (default) or hmac-sha512.
Sourcepub const RWS_CONFIG_ACME_DNS_EXEC: &'static str = "RWS_CONFIG_ACME_DNS_EXEC"
pub const RWS_CONFIG_ACME_DNS_EXEC: &'static str = "RWS_CONFIG_ACME_DNS_EXEC"
DNS-01 exec: the program run as <program> present|cleanup <fqdn> <value>.
Sourcepub const RWS_CONFIG_ACME_DNS_PROPAGATION_SECS: &'static str = "RWS_CONFIG_ACME_DNS_PROPAGATION_SECS"
pub const RWS_CONFIG_ACME_DNS_PROPAGATION_SECS: &'static str = "RWS_CONFIG_ACME_DNS_PROPAGATION_SECS"
DNS-01: how long to wait for the record to be visible (default 120).
Sourcepub const RWS_CONFIG_ACME_DNS_API_TOKEN: &'static str = "RWS_CONFIG_ACME_DNS_API_TOKEN"
pub const RWS_CONFIG_ACME_DNS_API_TOKEN: &'static str = "RWS_CONFIG_ACME_DNS_API_TOKEN"
DNS-01 cloudflare: the API token (DNS edit) — never printed.
Sourcepub const RWS_CONFIG_ACME_DNS_API_URL: &'static str = "RWS_CONFIG_ACME_DNS_API_URL"
pub const RWS_CONFIG_ACME_DNS_API_URL: &'static str = "RWS_CONFIG_ACME_DNS_API_URL"
DNS-01 cloudflare / route53: the API base URL instead of the provider’s own (a proxy, a test double).
Sourcepub const RWS_CONFIG_ACME_DNS_ZONE_ID: &'static str = "RWS_CONFIG_ACME_DNS_ZONE_ID"
pub const RWS_CONFIG_ACME_DNS_ZONE_ID: &'static str = "RWS_CONFIG_ACME_DNS_ZONE_ID"
DNS-01 cloudflare / route53: the zone’s id, instead of looking it up.
Sourcepub const RWS_CONFIG_ACME_REDIS: &'static str = "RWS_CONFIG_ACME_REDIS"
pub const RWS_CONFIG_ACME_REDIS: &'static str = "RWS_CONFIG_ACME_REDIS"
Redis (host:port) shared by replicas: one orders, all install.
Sourcepub const RWS_CONFIG_ACME_REDIS_PASSWORD: &'static str = "RWS_CONFIG_ACME_REDIS_PASSWORD"
pub const RWS_CONFIG_ACME_REDIS_PASSWORD: &'static str = "RWS_CONFIG_ACME_REDIS_PASSWORD"
Password for RWS_CONFIG_ACME_REDIS — never printed.
Sourcepub const RWS_CONFIG_ACME_REDIS_PREFIX: &'static str = "RWS_CONFIG_ACME_REDIS_PREFIX"
pub const RWS_CONFIG_ACME_REDIS_PREFIX: &'static str = "RWS_CONFIG_ACME_REDIS_PREFIX"
Key prefix in that Redis (default rws:acme).
Sourcepub const RWS_CONFIG_ACME_ON_DEMAND: &'static str = "RWS_CONFIG_ACME_ON_DEMAND"
pub const RWS_CONFIG_ACME_ON_DEMAND: &'static str = "RWS_CONFIG_ACME_ON_DEMAND"
true: order a certificate at the first TLS handshake for a name
RWS_CONFIG_ACME_ON_DEMAND_ASK allows (since 18.4.0).
Sourcepub const RWS_CONFIG_ACME_ON_DEMAND_ASK: &'static str = "RWS_CONFIG_ACME_ON_DEMAND_ASK"
pub const RWS_CONFIG_ACME_ON_DEMAND_ASK: &'static str = "RWS_CONFIG_ACME_ON_DEMAND_ASK"
On-demand TLS: URL asked ?domain=<name> before each order; 2xx allows it.
pub const RWS_DEFAULT_IP: &'static str = "127.0.0.1"
pub const RWS_DEFAULT_PORT: &'static i32
pub const RWS_DEFAULT_THREAD_COUNT: &'static i32
pub const RWS_DEFAULT_REQUEST_ALLOCATION_SIZE_IN_BYTES: &'static i64
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.