Updated on 2023-08-11 GMT+08:00

CDN.Referer

Element Description

The CDN.Referer element is used to configure referer filtering rules. You can set referer filtering policies to identify and filter users, controlling access.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

refererType

Yes

Referer type

Type: string

Value Description: unused: no referer filtering is configured; whiteList: whitelist; blackList: blacklist.

includeEmpty

No

Whether blank referers are included

Type: boolean

Value Description: A blacklist including blank referers indicates that requests without any referers are not allowed to access. A whitelist including blank referers indicates that requests without any referers are allowed to access.

refererList

No

List of domain names that are separated by semicolon (;)

Type: string

domainId

Yes

Acceleration domain name ID

Type: HuaweiCloud.CDN.Domain.Id

Value Description: You are advised to use the get_input function to obtain the value, or connect to the CDN.Domain object and use the get_reference function to obtain the value.

Relationships Between Elements

Table 2 Relationship description

Description

Target

Connected

CDN.Domain

Return Value

Property

Type

Description

refID

string

CDN Referer ID

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0 
 node_templates: 
   cdnd4u36: 
     type: HuaweiCloud.CDN.Domain 
     properties: 
       sources: 
         - activeStandby: 
             get_input: cdnd4u36_sources_0_activeStandby 
           originType: 
             get_input: cdnd4u36_sources_0_originType 
           ipOrDomain: 
             get_input: cdnd4u36_sources_0_ipOrDomain 
       businessType: 
         get_input: cdnd4u36_businessType 
       domainName: 
         get_input: cdnd4u36_domainName 
   cdnr140q: 
     type: HuaweiCloud.CDN.Referer 
     properties: 
       refererType: 
         get_input: cdnr140q_refererType 
       domainId: 
         get_reference: cdnd4u36 
       includeEmpty: 
         get_input: cdnr140q_includeEmpty 
       refererList: 
         get_input: cdnr140q_refererList 
     requirements: 
       - domainId: 
           node: cdnd4u36 
 inputs: 
   cdnd4u36_sources_0_activeStandby: 
     description: Active/standby status 
     default: master 
     label: '' 
   cdnd4u36_sources_0_originType: 
     description: Source site type 
     label: '' 
   cdnd4u36_sources_0_ipOrDomain: 
     description: Source IP address or domain name 
     label: '' 
   cdnd4u36_businessType: 
     description: Domain name service type 
     label: '' 
   cdnd4u36_domainName: 
     description: Acceleration domain name 
     label: '' 
   cdnr140q_refererType: 
     description: Referer type 
     label: '' 
   cdnr140q_includeEmpty: 
     description: Whether blank referers are included 
     label: '' 
   cdnr140q_refererList: 
     description: List of domain names that are separated by semicolon (;) 
     label: ''