Configuration
Every directive below is optional except root and at least one handler.
Directive reference
| Directive | Default | Notes |
|---|---|---|
encode zstd gzip | off | Apply inside the static handler only. Never on a streamed path. |
flush_interval -1 | 0 | Immediate flush. Required for duplex proxying. |
transport http { versions h2c } | 1.1 | Cleartext HTTP/2 to a loopback backend. |
read_timeout / write_timeout | none | Set to 900s for long-lived streams. |
log output file | stderr | Size-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.
- Exact paths have no asterisk and match one URL only.
- Prefix matchers end with
*and match any suffix. - Matchers never inspect the query string.
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.