Configuration
Fairvisor Edge does not use a YAML app config file. Runtime configuration is composed of:
- A policy bundle JSON (local file or SaaS-delivered)
- Environment variables for mode, connectivity, and runtime tuning
Policy bundle
The enforcement rules live in a JSON bundle (for example policy.json).
Canonical schema and field behavior:
Minimal example:
{
"bundle_version": 1,
"policies": [
{
"id": "api-default",
"spec": {
"selector": { "pathPrefix": "/api/" },
"rules": [
{
"name": "per-key-rps",
"limit_keys": ["header:x-api-key"],
"algorithm": "token_bucket",
"algorithm_config": {
"tokens_per_second": 50,
"burst": 100
}
}
]
}
}
]
}
Environment variables
Fairvisor runtime mode and wiring are controlled by env vars.
See full reference: Environment Variables
Most common variables:
| Variable | Required | Purpose |
|---|---|---|
FAIRVISOR_MODE |
no | decision_service or reverse_proxy |
FAIRVISOR_CONFIG_FILE |
conditional | Local bundle path for standalone mode |
FAIRVISOR_SAAS_URL |
conditional | SaaS control-plane URL |
FAIRVISOR_EDGE_ID |
conditional | Edge identity for SaaS mode |
FAIRVISOR_EDGE_TOKEN |
conditional | SaaS bearer token |
FAIRVISOR_BACKEND_URL |
conditional | Upstream URL for reverse_proxy |
Mode summary
- Standalone: set
FAIRVISOR_CONFIG_FILE - SaaS mode: set
FAIRVISOR_SAAS_URL,FAIRVISOR_EDGE_ID,FAIRVISOR_EDGE_TOKEN - Reverse proxy mode: set
FAIRVISOR_MODE=reverse_proxyandFAIRVISOR_BACKEND_URL
Validation behavior
At startup, entrypoint.sh and runtime env validation fail fast on invalid combinations (for example missing SaaS credentials or missing bundle source).
For exact rules, see Environment Variables.