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 referers: When the anti-hotlinking type is whitelist, true means that empty referers are allowed, false means that empty referers are not allowed; when the anti-hotlinking type is blacklist, true means that empty referers are rejected, and false means that empty referers are not rejected.
|
String[] |
getReferers()
Get Referer content list
|
String |
getRefererType()
Get rferer configuration type, value: whitelist: whitelist; blacklist: blacklist.
|
String[] |
getRulePaths()
Get Matching content under the corresponding type of RuleType: Fill in * when all is used; Fill in suffix name when file is used, such as jpg, txt; Fill in path when directory is used, such as /xxx/ test/; Fill in the absolute path when path is specified, such as /xxx/test.html.
|
String |
getRuleType()
Get Rule type: all: valid for all files; file: valid for specified file suffix; directory: valid for specified path; path: specified absolute The path takes effect.
|
void |
setAllowEmpty(Boolean AllowEmpty)
Set Whether to allow empty referers: When the anti-hotlinking type is whitelist, true means that empty referers are allowed, false means that empty referers are not allowed; when the anti-hotlinking type is blacklist, true means that empty referers are rejected, and false means that empty referers are not rejected.
|
void |
setReferers(String[] Referers)
Set Referer content list
|
void |
setRefererType(String RefererType)
Set rferer configuration type, value: whitelist: whitelist; blacklist: blacklist.
|
void |
setRulePaths(String[] RulePaths)
Set Matching content under the corresponding type of RuleType: Fill in * when all is used; Fill in suffix name when file is used, such as jpg, txt; Fill in path when directory is used, such as /xxx/ test/; Fill in the absolute path when path is specified, such as /xxx/test.html.
|
void |
setRuleType(String RuleType)
Set Rule type: all: valid for all files; file: valid for specified file suffix; directory: valid for specified path; path: specified absolute The path takes effect.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public RefererRule()
public RefererRule(RefererRule source)
public String getRuleType()
public void setRuleType(String RuleType)
RuleType
- Rule type: public String[] getRulePaths()
public void setRulePaths(String[] RulePaths)
RulePaths
- Matching content under the corresponding type of RuleType: public String getRefererType()
public void setRefererType(String RefererType)
RefererType
- rferer configuration type, value: public String[] getReferers()
public void setReferers(String[] Referers)
Referers
- Referer content listpublic Boolean getAllowEmpty()
public void setAllowEmpty(Boolean AllowEmpty)
AllowEmpty
- Whether to allow empty referers: When the anti-hotlinking type is whitelist, true means that empty referers are allowed, false means that empty referers are not allowed; when the anti-hotlinking type is blacklist, true means that empty referers are rejected, and false means that empty referers are not rejected.Copyright © 2024. All rights reserved.