Generally, content delivered over CDN are public resources by default, which can be accessed by users with URLs. To prevent malicious users from hotlinking your content for profit, you can configure advanced timestamp authentication in addition to access control policies such as referer blacklist/whitelist, IP blacklist/whitelist, and IP access frequency limit.
After timestamp hotlink protection is configured, the client needs to calculate the signature as configured and carry it to the server when initiating a request. The CDN node will authenticate the signature on the server, which will pass only after successful authentication.
Log in to the CDN Console, select Domain Management on the left sidebar, and click Manage on the right of the domain name to access its configuration page. Under the Security Configuration tab, find the authentication configuration, which is disabled by default:
CDN provides four authentication signature calculation models of your choice. You can open the Authentication Calculator at the top to view these models. For more information on the configuration effect and algorithms, please see the specific algorithm documents for TypeA, TypeB, TypeC, and TypeD:
You can toggle the authentication configuration switch to disable this feature. When the switch is off, any existing configuration will not take effect in the production environment. If you toggle the switch on, a message will be displayed asking for your confirmation before the configuration takes effect across the entire network.
If your acceleration domain name is configured for global acceleration and you want acceleration in and outside mainland China to have different authentication configurations, you can click Add Special Configuration under the configuration.
Currently, an added region-specific configuration item cannot be deleted, and can only be disabled.
Suppose the domain name
cloud.tencent.com is configured for global acceleration and the authentication configuration is as follows:
Then, the actual effect will be as follows:
http://cloud.tencent.com/1.jpgby directly initiating a request.
http://cloud.tencent.com/1.jpgby initiating a request with a URL in the format of