Config Schema
qaws config is strict JSON. Unknown keys and invalid types are errors.
Top-level keys
| Key | Type | Required | Default |
|---|---|---|---|
listen | object | no | default host and port |
serve | string | no | ./public |
daemon | object | no | daemon disabled |
logging | object | no | plain logs, access enabled |
security | object | no | dotfiles denied except .well-known |
cache | object | no | cache enabled |
headers | object | no | no custom headers |
http | object | no | default 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.portmust be a valid TCP port.- Tuning values must be positive.
logging.formatmust beplainorjsonl.security.dotfilesmust bedeny_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
VaryCLI precedence
These are equivalent except the CLI command overrides selected values:
qaws --config qaws.json --port 8081 --no-keep-aliveConfig is loaded first, then CLI flags are applied.
HTTP feature defaults
| Key | Type | Default | Behavior |
|---|---|---|---|
etag | boolean | true | Emits weak representation ETags and evaluates If-None-Match. |
range_requests | boolean | true | Enables one normal, open-ended, or suffix byte range. |
precompressed | boolean | true | Negotiates 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.