Updated on 2024-09-27 GMT+08:00

Referer Validation

Referer validation allows you to control access sources based on the referer field carried in an HTTP request. CDN allows or rejects playback requests based on the configured blacklist or whitelist.

Notes

  • This function is optional and is disabled by default.
  • Whitelisting and blacklisting cannot be used simultaneously.
  • A maximum of 100 domain names can be added to a blacklist or whitelist.
  • Domain names added to a blacklist or whitelist are matched using regular expressions. For example, if you add ^http://test.*com$ to a blacklist or whitelist, http://test.example.com and http://test.example01.com are also matched.

Prerequisites

Procedure

  1. Log in to the Live console.
  2. In the navigation pane, choose Domains.
  3. Click Manage in the Operation column of the desired streaming domain name.
  4. In the navigation pane, choose Basic Settings > Access Control.
  5. Choose Referer Validation. The Referer Validation dialog box is displayed.
  6. Toggle on the switch and configure related parameters.

    Figure 1 Configuring referer validation

    Table 1 describes the parameters.

    Table 1 Parameter description

    Parameter

    Description

    Type

    The blacklist and whitelist are supported.
    • Referer blacklist allows all domains access to CDN except for the domains added to the blacklist.
    • Referer whitelist denies all domains access to CDN except for the domains added to the whitelist.

    You can set whether to allow requests with empty referer fields, that is, whether to allow access through the browser address bar.

    Rule

    Domain name in the blacklist or whitelist.

    • You can input 1 to 100 domain names. Use semicolons (;) to separate domain names.
    • Domain names are matched using regular expressions. If ^http://test.*com$ is entered, http://test.example.com and http://test.example01.com are also matched.

  7. Click OK.