Content Banning

更新时间:2023-03-14 16:47:48

1 Feature Intro

1.1 Brief Introduction

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.

1.2 Applicable Product Lines

  • Media Acceleration

1.3 Application Scenarios

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.

2 Feature Detail

2.1 Basic Principles

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.

2.2 Working Process

Process of banning URL

  1. The customer pass the URL to be blocked to CDNetworks Content Management Server through Console or API;
  2. Content Management Server sends a banning task carrying the customer URL and banning info to the CDN PoPs. After receiving the ban task, the CDN PoPs adds the URL to the ban list and deletes the content cached by the CDN PoPs;
  3. The user initiates the URL request to the CDN PoPs, and the CDN PoPs verify whether the URL is in the ban list;
  4. When the CDN PoP finds that the URL is in the banned list, it rejects the user’s request.

Process of unbanning URL

  1. The customer pass the URL to be unbanned to CDNetworks Content Management Server through Console or API;
  2. Content Management Server sends an unbanning task carrying the customer URL and unblocking info to the CDN PoPs, and the CDN PoPs remove the URL from the ban list after receiving the unblocking task;
  3. The user initiates the URL request to the CDN PoPs, and the CDN PoPs verify whether the URL is in the ban list;
  4. When the CDN PoP find that the URL is not in the ban list, it goes back to origin to obtain the corresponding content;
  5. The origin responds content to CDN PoP;
  6. The CDN PoP responds to the user’s request and caches the file.

2.3 Instructions on Console

2.4 Interface Description

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:

  • batch submission of banning or unbanning URLs
  • submitting banning and unbanning URLs at the same time
  • submission of Chinese URL
  • customizing the response code of the banned URL

2.4.1 Request Description

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.

2.4.2 Request Example

#!/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.

}'  

3. Notice

  • Only supports banning/unbanning URLs of doomains accelerated by CDNetworks.
  • Support submitting URL information of http/https protocol.
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!