Skip to content

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_cloudfront

Built-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 ​

KeyEnvDescription
custom_rangesEDGE_TRUST_CUSTOM_RANGESComma-separated CIDRs merged into the trusted set
exclude_rangesEDGE_TRUST_EXCLUDE_RANGESComma-separated CIDRs removed after merge
custom_provider_ranges—Per-provider static ranges (published config)

cache ​

KeyTypeEnvDefaultDescription
store?stringEDGE_TRUST_CACHE_STOREnullCache store name; null uses the default
prefixstringEDGE_TRUST_CACHE_PREFIXedge-trustPrefix for cache keys
ttlintEDGE_TRUST_CACHE_TTL86400Fresh cache lifetime (seconds)
stale_ttlintEDGE_TRUST_CACHE_STALE_TTL604800Last-known-good retention
lock_secondsintEDGE_TRUST_SYNC_LOCK120Sync lock duration

http ​

KeyTypeEnvDefault
timeoutintEDGE_TRUST_HTTP_TIMEOUT30
connect_timeoutintEDGE_TRUST_HTTP_CONNECT_TIMEOUT10
user_agentstringEDGE_TRUST_HTTP_USER_AGENThosni/laravel-edge-trust
reject_non_globalboolEDGE_TRUST_REJECT_NON_GLOBALtrue

registry ​

Optional remote JSON catalog URL via EDGE_TRUST_REGISTRY_URL.

archives ​

KeyEnvDefaultDescription
pathEDGE_TRUST_ARCHIVES_PATHnullCustom archives path; null uses package resources/proxies
verify_checksumsEDGE_TRUST_VERIFY_CHECKSUMStrueVerify archive digests

validation ​

KeyEnvDefaultDescription
reject_non_globalEDGE_TRUST_REJECT_NON_GLOBALtrueReject 0.0.0.0/0 and ::/0
reject_non_global_customEDGE_TRUST_REJECT_NON_GLOBAL_CUSTOMfalseApply the same rule to custom ranges
min_prefixes_default—1Default minimum valid prefixes
min_prefixes—per-provider mapProvider-specific floors
max_change_percent_default—50.0Max allowed swing vs previous set
max_change_percent—per-provider mapOverrides

fallback ​

KeyEnvDefaultDescription
use_last_known_goodEDGE_TRUST_USE_LAST_KNOWN_GOODtruePrefer last successful sync on failure
use_bundledEDGE_TRUST_USE_BUNDLEDtrueFall back to bundled archives
fail_open_emptyEDGE_TRUST_FAIL_OPEN_EMPTYfalseIf true, empty resolution may trust nothing vs blocking

headers ​

Laravel Request::HEADER_* bitfield used by EdgeTrust's TrustProxies middleware. Published config only.

logging ​

KeyEnvDefault
enabledEDGE_TRUST_LOGGINGtrue
channelEDGE_TRUST_LOG_CHANNELnull

sync ​

KeyEnvDefaultDescription
scheduleEDGE_TRUST_SCHEDULE_SYNCtrueAuto-register scheduled sync
cronEDGE_TRUST_SYNC_CRON0 */6 * * *Cron expression
forceEDGE_TRUST_SYNC_FORCEfalseBypass change-percent guards when scheduled

Released under the MIT License.