Configuration

Every directive below is optional except root and at least one handler.

Directive reference

DirectiveDefaultNotes
encode zstd gzipoffApply inside the static handler only. Never on a streamed path.
flush_interval -10Immediate flush. Required for duplex proxying.
transport http { versions h2c }1.1Cleartext HTTP/2 to a loopback backend.
read_timeout / write_timeoutnoneSet to 900s for long-lived streams.
log output filestderrSize-based rotation, six archives.

Header policy

The edge adds a small, fixed set of headers and removes the server banner. Keeping this identical across sites makes downstream caching predictable.

header {
    -Server
    Strict-Transport-Security "max-age=31536000; includeSubDomains"
    X-Content-Type-Options "nosniff"
    X-Frame-Options "SAMEORIGIN"
    Referrer-Policy "strict-origin-when-cross-origin"
}

Path matchers

Matchers are evaluated in declaration order. The first match wins, and an unwatched request falls through to the static handler. Prefix matchers are written as path /api/v2/media* — the trailing asterisk is significant.

Reloading

beacon validate --config /etc/beacon/CONFIG
beacon reload  --config /etc/beacon/CONFIG --force

Validation runs the full adapter and TLS policy check without binding ports. Reload swaps the running config atomically; existing connections are drained, not dropped.