rust-web-server 17.41.0

An HTTP web framework, reverse proxy, and server for Rust supporting HTTP/1.1, HTTP/2, and HTTP/3. Config-driven proxy mode (rws.config.toml with [[route]] / [[upstream]]) or library crate. No third-party HTTP dependencies.
Documentation
ip = '127.0.0.1'
port = 7888
thread_count = 200
request-allocation-size-in-bytes = 12000 # In bytes, how much memory to allocate for each request

# TLS certificate and private key (PEM format). Required for HTTPS and HTTP/2.
# Build with --features http2 to enable TLS support.
# tls_cert_file = '/path/to/cert.pem'
# tls_key_file  = '/path/to/key.pem'

# mTLS — require clients to present a certificate signed by this CA.
# Leave unset to disable client certificate verification (default).
# tls_client_ca_file = '/path/to/ca.pem'

# Virtual hosting / SNI routing — one [[virtual_host]] block per domain.
# The cert above is the fallback when no virtual host matches or SNI is absent.
# [[virtual_host]]
# domain    = 'example.com'
# cert_file = '/etc/ssl/example.pem'
# key_file  = '/etc/ssl/example.key'
#
# [[virtual_host]]
# domain    = 'other.com'
# cert_file = '/etc/ssl/other.pem'
# key_file  = '/etc/ssl/other.key'

[cors]
allow_all = false # true will allow all CORS requests and you can omit configuring cors properties below
allow_origins = ["https://foo.example", "https://bar.example"] # list of allowed origins, this setting won't apply if cors allow_all set to true
allow_methods = ["GET", "DELETE", "PUT", "PATCH"] # list of allowed methods, this setting won't apply if cors allow_all set to true
allow_headers = ["content-type", "x-custom-header"] # list of allowed request headers, in lowercase, this setting won't apply if cors allow_all set to true
allow_credentials = true # if set to true, will allow to transmit credentials via CORS requests, this setting won't apply if cors allow_all set to true
expose_headers = ["content-type", "x-custom-header"] # list of allowed response headers, in lowercase, this setting won't apply if cors allow_all set to true
max_age = "86400" # in seconds, time to cache in browser CORS information, 86400s = 1 day; this setting won't apply if cors allow_all set to true