Global SettingsUpdate Domain Lock Settings

Update Domain Lock Settings

update stream domain setting

curl -X POST "https://api.5centscdn.com/v2/streams/settings/security/domainlock" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "N",
  "list": "www.domain-two.com",
  "policy": "Y",
  "ips": "117.251.60.184",
  "noreferer": "N",
  "mode": "save"
}'
{
  "result": "success",
  "message": "Stream Settings Updated. Please wait till the deployment completes."
}
POST
/streams/settings/security/domainlock
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring

Enable or disable domain lock. Y means enabled, N means disabled.

liststring

List of domains separated by comma.

policystring

Access policy for domain lock. Y means whitelist (allow listed domain), N means blacklist (block listed domain).

ipsstring

IPs listed are excluded from any restrictions

norefererstring

Block requests with no referrer header. Y means blocked, N means allowed.

modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
enabledstring

Enable or disable domain lock. Y means enabled, N means disabled.

Example:
N
liststring

List of domains separated by comma.

Example:
www.domain-two.com
policystring

Access policy for domain lock. Y means whitelist (allow listed domain), N means blacklist (block listed domain).

Example:
Y
ipsstring

IPs listed are excluded from any restrictions

Example:
117.251.60.184
norefererstring

Block requests with no referrer header. Y means blocked, N means allowed.

Example:
N
modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

Example:
save

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.