index : static-web-server.git

ascending towards madness

[general]

#### Address & Root dir
host = "::"
port = 8087
root = "docker/public"

#### Logging
log-level = "debug"

#### Cache Control headers
cache-control-headers = true

#### Auto Compression
compression = true

#### Error pages
page404 = "docker/public/404.html"
page50x = "docker/public/50x.html"

#### HTTP/2 + TLS
http2 = false
http2-tls-cert = ""
http2-tls-key = ""

#### CORS & Security headers
security-headers = true
cors-allow-origins = ""

#### Directoy listing
directory-listing = false

#### Basich Authentication
basic-auth = ""

#### File descriptor binding
# fd = ""

#### Worker threads
threads-multiplier = 1

#### Grace period after a graceful shutdown
grace-period = 0

#### Page fallback for 404s
page-fallback = ""

[advanced]

#### HTTP Headers customization

#### a. Oneline version
[[headers]]
source = "**/*.@(eot|otf|ttf|ttc|woff|font.css)"
headers = { Access-Control-Allow-Origin = "*", X-XSS-PROTECTION = "1; mode=block" }

#### b. Multiline version
[[headers]]
  source = "**/*.@(jpg|jpeg|gif|png)"
[headers.headers]
  Cache-Control = "max-age=7200"
  Content-Security-Policy = "frame-ancestors 'self'"

#### c. Multiline version with explicit key (dotted)
[[headers]]
source = "404.html"
headers.Cache-Control = "max-age=300"
headers.Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"