Configuration Reference
Package defaults live in config/edge-trust.php. Publishing is optional — common keys are env-driven.
mode
- Type:
string - Default:
hybrid - Env:
EDGE_TRUST_MODE - Values:
bundled|runtime|hybrid
providers
Enabled provider keys. Empty list = all registered providers.
- Env:
EDGE_TRUST_PROVIDERS - Default:
cloudflare - Format: comma-separated keys; empty or
*→ all providers
ini
EDGE_TRUST_PROVIDERS=cloudflare,aws_cloudfrontBuilt-in keys: cloudflare, aws_cloudfront, fastly, bunny, google_cloud, arvancloud.
provider_sources
Optional per-provider source override: bundled | provider | registry | custom. Published config only.
provider_classes
Map of built-in provider key ⇒ class name. Defaults to the package providers.
custom_providers
php
'custom_providers' => [
// 'my-proxy' => \App\EdgeTrust\MyCustomProxyProvider::class,
],You can also call EdgeTrust::registerProvider() at boot.
custom_ranges / exclude_ranges / custom_provider_ranges
| Key | Env | Description |
|---|---|---|
custom_ranges | EDGE_TRUST_CUSTOM_RANGES | Comma-separated CIDRs merged into the trusted set |
exclude_ranges | EDGE_TRUST_EXCLUDE_RANGES | Comma-separated CIDRs removed after merge |
custom_provider_ranges | — | Per-provider static ranges (published config) |
cache
| Key | Type | Env | Default | Description |
|---|---|---|---|---|
store | ?string | EDGE_TRUST_CACHE_STORE | null | Cache store name; null uses the default |
prefix | string | EDGE_TRUST_CACHE_PREFIX | edge-trust | Prefix for cache keys |
ttl | int | EDGE_TRUST_CACHE_TTL | 86400 | Fresh cache lifetime (seconds) |
stale_ttl | int | EDGE_TRUST_CACHE_STALE_TTL | 604800 | Last-known-good retention |
lock_seconds | int | EDGE_TRUST_SYNC_LOCK | 120 | Sync lock duration |
http
| Key | Type | Env | Default |
|---|---|---|---|
timeout | int | EDGE_TRUST_HTTP_TIMEOUT | 30 |
connect_timeout | int | EDGE_TRUST_HTTP_CONNECT_TIMEOUT | 10 |
user_agent | string | EDGE_TRUST_HTTP_USER_AGENT | hosni/laravel-edge-trust |
reject_non_global | bool | EDGE_TRUST_REJECT_NON_GLOBAL | true |
registry
Optional remote JSON catalog URL via EDGE_TRUST_REGISTRY_URL.
archives
| Key | Env | Default | Description |
|---|---|---|---|
path | EDGE_TRUST_ARCHIVES_PATH | null | Custom archives path; null uses package resources/proxies |
verify_checksums | EDGE_TRUST_VERIFY_CHECKSUMS | true | Verify archive digests |
validation
| Key | Env | Default | Description |
|---|---|---|---|
reject_non_global | EDGE_TRUST_REJECT_NON_GLOBAL | true | Reject 0.0.0.0/0 and ::/0 |
reject_non_global_custom | EDGE_TRUST_REJECT_NON_GLOBAL_CUSTOM | false | Apply the same rule to custom ranges |
min_prefixes_default | — | 1 | Default minimum valid prefixes |
min_prefixes | — | per-provider map | Provider-specific floors |
max_change_percent_default | — | 50.0 | Max allowed swing vs previous set |
max_change_percent | — | per-provider map | Overrides |
fallback
| Key | Env | Default | Description |
|---|---|---|---|
use_last_known_good | EDGE_TRUST_USE_LAST_KNOWN_GOOD | true | Prefer last successful sync on failure |
use_bundled | EDGE_TRUST_USE_BUNDLED | true | Fall back to bundled archives |
fail_open_empty | EDGE_TRUST_FAIL_OPEN_EMPTY | false | If true, empty resolution may trust nothing vs blocking |
headers
Laravel Request::HEADER_* bitfield used by EdgeTrust's TrustProxies middleware. Published config only.
logging
| Key | Env | Default |
|---|---|---|
enabled | EDGE_TRUST_LOGGING | true |
channel | EDGE_TRUST_LOG_CHANNEL | null |
sync
| Key | Env | Default | Description |
|---|---|---|---|
schedule | EDGE_TRUST_SCHEDULE_SYNC | true | Auto-register scheduled sync |
cron | EDGE_TRUST_SYNC_CRON | 0 */6 * * * | Cron expression |
force | EDGE_TRUST_SYNC_FORCE | false | Bypass change-percent guards when scheduled |