Create a new Playback Restriction.
curl 'https://api.mux.com/video/v1/playback-restrictions' \
-X POST \
-d '{ "referrer": { "allowed_domains": ["*.example.com"], "allow_no_referrer": true } }' \
-H "Content-Type: application/json" \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}
A list of domains allowed to play your videos.
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 wildcardsA 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.
Rules that control what user agents are allowed to play your videos. Please see Using User-Agent HTTP header for validation for more details on this feature.
Whether or not to allow views without a User-Agent
HTTP request header.
Whether or not to allow high risk user agents. The high risk user agents are defined by Mux.
{
"referrer": {
"allowed_domains": [
"*.example.com"
],
"allow_no_referrer": true
},
"user_agent": {
"allow_no_user_agent": false,
"allow_high_risk_user_agent": false
}
}
{
"data": {
"id": "9dbEg8o00uqQzZbzJT6NXdqNA00SdnSo8O",
"updated_at": "1607945257",
"created_at": "1607945257",
"referrer": {
"allowed_domains": [
"*.example.com"
],
"allow_no_referrer": true
},
"user_agent": {
"allow_no_user_agent": false,
"allow_high_risk_user_agent": false
}
}
}