Skip to Content
ReferenceConfig Schema

Config Schema

qaws config is strict JSON. Unknown keys and invalid types are errors.

Top-level keys

KeyTypeRequiredDefault
listenobjectnodefault host and port
servestringno./public
daemonobjectnodaemon disabled
loggingobjectnoplain logs, access enabled
securityobjectnodotfiles denied except .well-known
cacheobjectnocache enabled
headersobjectnono custom headers
httpobjectnodefault HTTP behavior

Schema

{ "listen": { "host": "0.0.0.0", "port": 80 }, "serve": "./public", "daemon": { "enabled": false, "pid_file": null, "log_file": null }, "logging": { "format": "plain", "access": true }, "security": { "dotfiles": "deny_except_well_known" }, "cache": { "enabled": true, "max_file_bytes": 262144, "max_total_bytes": 16777216, "revalidate_ms": 1000 }, "headers": {}, "http": { "last_modified": true, "trailing_slash_redirect": true, "keep_alive": true, "keep_alive_timeout_ms": 5000, "max_requests_per_connection": 1000, "max_connections": 1024, "workers": 4, "sendfile": true, "etag": true, "range_requests": true, "precompressed": true } }

Validation rules

  • listen.port must be a valid TCP port.
  • Tuning values must be positive.
  • logging.format must be plain or jsonl.
  • security.dotfiles must be deny_except_well_known.
  • Header names and values must be strings.
  • Protected headers are rejected.
  • The serve path must exist for qaws check.

Protected headers

Content-Length Content-Type Connection Server Allow Location ETag Accept-Ranges Content-Range Content-Encoding Vary

CLI precedence

These are equivalent except the CLI command overrides selected values:

qaws --config qaws.json --port 8081 --no-keep-alive

Config is loaded first, then CLI flags are applied.

HTTP feature defaults

KeyTypeDefaultBehavior
etagbooleantrueEmits weak representation ETags and evaluates If-None-Match.
range_requestsbooleantrueEnables one normal, open-ended, or suffix byte range.
precompressedbooleantrueNegotiates adjacent .br and .gz sidecars.

These settings are JSON-only in 0.2.7; there are no corresponding CLI flags. If-None-Match takes precedence over If-Modified-Since, ranges apply to the selected representation, and sidecar selection adds Vary: Accept-Encoding.

qaws docs. Built for static hosting.