Skip to Content
Update the Referrer Playback Restriction
put

Allows you to modify the list of domains or change how Mux validates playback requests without the Referer HTTP header. The Referrer restriction fully replaces the old list with this new list of domains.

curl 'https://api.mux.com/video/v1/playback-restrictions/${PLAYBACK_RESTRICTION_ID}/referrer' \
  -X PUT \
  -d '{ "allowed_domains": ["*.example.com"], "allow_no_referrer": true }' \
  -H "Content-Type: application/json" \
  -u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}
Request body params
allowed_domains
array

List of domains allowed to play videos. Possible values are

  • [] Empty Array indicates deny video playback requests for all domains
  • ["*"] A Single Wildcard * entry means allow video playback requests from any domain
  • ["*.example.com", "foo.com"] A list of up to 10 domains or valid dns-style wildcards
allow_no_referrer
boolean
(default: false)

A boolean to determine whether to allow or deny HTTP requests without Referer HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a Referer HTTP header. Set this value to true to allow these playback requests.

Request path & query params
PLAYBACK_RESTRICTION_ID
string

ID of the Playback Restriction.

put
200
/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer
Request
(application/json)
{
  "allowed_domains": [
    "*.example.com"
  ],
  "allow_no_referrer": true
}
Response
(application/json)
{
  "data": {
    "id": "9dbEg8o00uqQzZbzJT6NXdqNA00SdnSo8O",
    "updated_at": "1607945257",
    "created_at": "1607939184",
    "referrer": {
      "allowed_domains": [
        "*.example.com"
      ],
      "allow_no_referrer": true
    },
    "user_agent": {
      "allow_no_user_agent": false,
      "allow_high_risk_user_agent": false
    }
  }
}