Manages the whitelist of domains allowed to embed and play videos from this library. Combined with block_none_refer, this is the primary mechanism to control where the player is allowed to load.
Referrer Management
Manages the whitelist of domains allowed to embed and play videos from this library. Combined with block_none_refer, this is the primary mechanism to control where the player is allowed to load.
All operations in this section require the?action=query parameter. Without it, POST/DELETE requests return405 Unsupported method, and GET falls back to "library details" instead of returning referrers.
Endpoints and actions
| Method | ?action= | Operation |
|---|---|---|
| GET | refer | List allowed referrers |
| POST | refer | Add 1+ referrers |
| POST | referValidation | Toggle the block_none_refer policy |
| DELETE | refer | Remove 1+ referrers (asynchronous) |
Referrer lifecycle
pending → active (worker confirmed the domain at the CDN)
active → turning_inactive (when block_none_refer is set to false)
active → deleting → row destroyed (worker removed from CDN)
inactive ↔ pending (re-activated when block_none_refer turns true)
Intermediate states (pending, turning_inactive, deleting) typically resolve in seconds to a couple of minutes. Operations against a referrer in an intermediate state are rejected with 400 You have domains loading, please wait until they are loaded.
Side effects
- Every mutation pushes a message to SQS — the refer worker reconciles the whitelist with Bunny CDN's
videolibraryallowed-referers list. - Required system domains are always injected by the worker (dashboard, gstatic,
player-*hostnames) — you do not need to add them manually. - Audit log entries are queued for
addandremoveactions under thesecuritycategory.
Business rules
hostnameis validated by a strict regex (no scheme, no commas; wildcard*.example.comaccepted).- Duplicate hostnames per library return
400 Refer already exists(case-insensitive match). - Only
type: ALLOWis processed today; the field is required but its value is effectively fixed.
