Priority
constPriority:object
Defined in: src/policies/sdk/priority.ts:10
Type Declaration
Section titled “Type Declaration”
readonlyAUTH:10=10
Authentication (e.g. jwtAuth, apiKeyAuth, basicAuth)
readonlyCACHE:40=40
Caching — before upstream
CIRCUIT_BREAKER
Section titled “CIRCUIT_BREAKER”
readonlyCIRCUIT_BREAKER:30=30
Circuit breaker — protects upstream
DEFAULT
Section titled “DEFAULT”
readonlyDEFAULT:100=100
Default priority for unspecified policies
readonlyEARLY:5=5
Early pipeline (e.g. cors) — before auth
IP_FILTER
Section titled “IP_FILTER”
readonlyIP_FILTER:1=1
IP filtering — runs before all other logic
METRICS
Section titled “METRICS”
readonlyMETRICS:1=1
Metrics collection — just after observability
readonlyMOCK:999=999
Mock — terminal, replaces upstream
OBSERVABILITY
Section titled “OBSERVABILITY”
readonlyOBSERVABILITY:0=0
Observability policies (e.g. requestLog) — wraps everything
readonlyPROXY:95=95
Proxy header manipulation — just before upstream
RATE_LIMIT
Section titled “RATE_LIMIT”
readonlyRATE_LIMIT:20=20
Rate limiting — after auth
REQUEST_TRANSFORM
Section titled “REQUEST_TRANSFORM”
readonlyREQUEST_TRANSFORM:50=50
Request header transforms — mid-pipeline
RESPONSE_TRANSFORM
Section titled “RESPONSE_TRANSFORM”
readonlyRESPONSE_TRANSFORM:92=92
Response header transforms — after upstream
readonlyRETRY:90=90
Retry — wraps upstream fetch
TIMEOUT
Section titled “TIMEOUT”
readonlyTIMEOUT:85=85
Timeout — wraps upstream call