rust-web-server 17.18.0

Static file web server and HTTP toolkit written in Rust. Supports HTTP/3, HTTP/2, and HTTP/1.1. HTTP/3 and HTTP/2 require a TLS certificate; without one the server falls back to plain HTTP/1.1 automatically.
Documentation
export RWS_CONFIG_IP="127.0.0.1"
export RWS_CONFIG_PORT="7887"
export RWS_CONFIG_THREAD_COUNT="100"

#  CROSS ORIGIN RESOURCE SHARING
# true will allow all CORS requests and you can omit configuring cors properties below
export RWS_CONFIG_CORS_ALLOW_ALL="false"

# list of allowed origins, this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_ALLOW_ORIGINS="https://foo.example,https://bar.example"

# if set to true, will allow to transmit credentials via CORS requests, this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_ALLOW_CREDENTIALS="true"

# list of allowed request headers, in lowercase, this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_ALLOW_HEADERS="content-type,x-custom-header"

# list of allowed methods, this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_ALLOW_METHODS="GET,POST,PUT,DELETE"

# list of allowed response headers, in lowercase, this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_EXPOSE_HEADERS="content-type,x-custom-header"

# in seconds, time to cache in browser CORS information, 86400s = 1 day; this setting won't apply if cors allow_all set to true
export RWS_CONFIG_CORS_MAX_AGE="86400"

# In bytes, how much memory to allocate for each request
export RWS_CONFIG_REQUEST_ALLOCATION_SIZE_IN_BYTES="16000"

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