public class RefererRule extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| RefererRule() | 
| RefererRule(RefererRule source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
| Modifier and Type | Method and Description | 
|---|---|
| Boolean | getAllowEmpty()Get Whether to allow empty referer
`true`: Allow empty referer when `RefererType = whitelist`. | 
| String[] | getReferers()Get Referer content list | 
| String | getRefererType()Get Referer configuration types
`whitelist`: Allowlist
`blacklist`: Blocklist | 
| String[] | getRulePaths()Get Content for each `RuleType`:
For `all`, enter a wildcard `*`. | 
| String | getRuleType()Get Rule types:
`all`: Apply to all files. | 
| void | setAllowEmpty(Boolean AllowEmpty)Set Whether to allow empty referer
`true`: Allow empty referer when `RefererType = whitelist`. | 
| void | setReferers(String[] Referers)Set Referer content list | 
| void | setRefererType(String RefererType)Set Referer configuration types
`whitelist`: Allowlist
`blacklist`: Blocklist | 
| void | setRulePaths(String[] RulePaths)Set Content for each `RuleType`:
For `all`, enter a wildcard `*`. | 
| void | setRuleType(String RuleType)Set Rule types:
`all`: Apply to all files. | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic RefererRule()
public RefererRule(RefererRule source)
public String getRuleType()
public void setRuleType(String RuleType)
RuleType - Rule types:
`all`: Apply to all files.
`file`: Apply to files with the specified suffixes.
`directory`: Apply to specified paths.
`path`: Apply to specified absolute paths.public String[] getRulePaths()
public void setRulePaths(String[] RulePaths)
RulePaths - Content for each `RuleType`:
For `all`, enter a wildcard `*`.
For `file`, enter a suffix, e.g., `jpg` or `txt`.
For `directory`, enter a path, e.g., `/xxx/test/`.
For `path`, enter an absolute path, e.g., `/xxx/test.html`.public String getRefererType()
public void setRefererType(String RefererType)
RefererType - Referer configuration types
`whitelist`: Allowlist
`blacklist`: Blocklistpublic String[] getReferers()
public void setReferers(String[] Referers)
Referers - Referer content listpublic Boolean getAllowEmpty()
public void setAllowEmpty(Boolean AllowEmpty)
AllowEmpty - Whether to allow empty referer
`true`: Allow empty referer when `RefererType = whitelist`.
`false`: Reject empty refer when `RefererType = blacklist`.Copyright © 2025. All rights reserved.