Referer Configuration

Last updated: 2021-05-20 18:16:08

    You can set referer blocklist/allowlist and rules to block/allow playback requests so as to protect live streaming content. You can also choose whether to allow empty referer.

    How to Configure

    Referer URL supports HTTP protocol. CSS uses the referer field in an HTTP request to identify the source and verify the request, and then determine whether to accept or reject the request.

    Notes

    • Referer information is included in HTTP requests. After you enable referer configuration, live streams cannot be played back using RTMP, and the configuration is invalid for LEB streams as they do not verify referer configuration. If you are to configure the referer information, the FLV or HLS protocol is recommended for playback.
    • Enabling, disabling, or modifying the referer takes effects in 15-20 minutes after the configuration. You don't need to push again.

    Prerequisites

    Enabling Referer

    1. Select Domain Management, click the target playback domain or click Manage on the right to enter the domain management page.
    2. Go to Access Control > Referer Configuration and click Edit.
    3. Click to enable the referer and configure as follows:
      Configuration ItemDescription
      Referer Type Select Blocklist or Allowlist as the referer type.
      • You cannot select both of them.
      • When the referer allowlist is configured, request sources on the list will be allowed to access the live streaming content while those not on the list will be blocked.
      • When the referer blocklist is configured, request sources on the list will be blocked to access the live streaming content while those not on the list will be allowed.
      Allow Empty Referer
      • When this feature is enabled, access will be allowed for HTTP requests with empty or no referer field. Users can access the live stream URL directly via browsers.
      • When this feature is disabled, requests with empty referer will be rejected.
      Referer Patterns
      • You can enter up to 100 patterns. Please separate them with line breaks.
      • You can enter IPs or domain names. The field supports path prefixes (domain names and IPs) and wildcards (domain names) for match. For example:
        • If you enter `101.1.0.1` and `www.test.com`, the configuration will take effect for both `101.1.0.1/157` and `www.test.com/tencent`.
        • If you enter `*.test.com`, the configuration will take effect for both `www.test.com` and `a.test.com`.
      • If you enter no referer pattern, the blocklist/allowlist is not configured.
    4. Click Save.

    Modifying Referer

    1. Select Domain Management, click the target playback domain or click Manage on the right to enter the domain management page.
    2. Go to Access Control > Referer Configuration and click Edit.
    3. Modify the configuration items and click Save.

    Disabling Referer

    After enabling the referer, you can disable it by performing the following steps:

    1. Select Domain Management, click the target playback domain or click Manage on the right to enter the domain management page.
    2. Go to Access Control > Referer Configuration and click Edit.
    3. Click to disable the referer.
    4. Click Save.