更新时间:2023-03-14 16:47:48
In the video field where “content is king”, in addition to finding ways to prevent their content from being hotlinked or infringed, customers also need to pay special attention to whether the content they provide outside triggers policy or legal risks, such as pornography and terrorism, or infringe upon the copyrights of others’ content. Many video websites now contain UGC/PGC video content, which are mainly produced and uploaded by end users. Video websites have poor controllability over these contents, which may easily trigger policy or legal risks. Even if the customer has an online video intelligent identification solution, it’s still hard to avoid the spread of pornography, gambling and drug content, or the infringement.
Then, quickly stopping the dissemination of illegal content and copyright infringement is particularly important for customers. Based on CDN acceleration, CDNetworks has been committed to guaranteeing the service quality of customers and safeguarding the legal interests of customers. CDNetworks provides Contente Banning to help with it. Customers can use the Console (web visual interface) or API to block and unblock illegal content in a timely manner.
Applicable to scenarios such as URLs known to the customer to trigger policy or legal risks or be hotlinked, and need to be blocked urgently across the entire network to avoid risks or bandwidth surges.
Principles of banning URLs
The customer passes the URL to be blocked to the CDNetworks Content Management Server through Console or API self-service interface, and Content Management Server sends the banning task to the CDN PoPs, and the CDN PoPs identifies the URL and adds the URL to the banning list, and delete the corresponding cache content at the same time. When a user accesses the URL later, the CDN PoP directly rejects the user’s request.
In addition, the CDN PoPs supports the detection of valid requests being responded. Once the response request is found to be a banned URL, the response will be cut off immediately.
Principle of unbanning URL
The customer passes the URL to be unblocked to the CDNetworks Content Management Server through Console or API self-service interface, and Content Management Server sends the unbanning task to the CDN PoPs, then CDN PoPs identify the URL and removes the URL from the banning list. In addition, when a user visits the URL later, the CDN PoP will respond to the user’s request.
Process of banning URL
Process of unbanning URL
Certain URLs containing sensitive information are prohibited from being accessed, which can be blocked through this interface. In case of misblocking or other needs, URL access can also be restored through this interface. The interface supports the following functions:
Table 1 Parameter description of Content Banning API interface request
Parameter | Required | Description |
---|---|---|
deny | yes | the group of URLs to be banned. After banning, when the user accesses the URL, the CDN PoPs will reject the user request. Note: deny and allow cannot be empty at the same time. |
allow | yes | the group of URLs to be unbanned. After unbanning, when the user accesses the URL, the CDN PoPs will respond to the user request. Note: deny and allow cannot be empty at the same time. |
#!/bin/bash
username="{username}"
-- The customer name provided by CDNetworks when the customer applies for the API interface permission, which is used for API interface authentication.
apiKey="{apiKey}"
-- The customer key provided by CDNetworks when the customer applies for the API interface permission, which is used for API interface authentication.
date=\`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
-- The time point of submitting the banning/unbanning task. Customers do not need to pay attention to it.
password=\`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
-- Encrypt the key submitted by the customer, customer does not need to pay attention to it.
curl -i --url "http://open.chinanetcenter.com/ccm/BanUrl/DealReceiver"
\-u “$username:$password”
\-H "Date:$date"
\-H "Content-Type: application/json"
\-d'{
"deny":\[
"http://www.a.com/test/1.mp4",
"http://www.a.com/test/2.flv"
\],
-- URLs that need to be banned.
"allow":\[
"http://www.a.com/test/3.mp4",
"http://www.a.com/test/4.flv"
\]
-- URLs that need to be unbanned.
}'