Set up Object Storage Anti-leech - SetUFileReferer
Overview
Set up Object Storage Anti-leech
Definition
Public Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Action | string | Corresponding API command name, the current API is SetUFileReferer. | Yes |
| PublicKey | string | The user’s public key can be obtained from Console | Yes |
| Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Region | string | Region. See List of Regions and Availability Zones | No |
| ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
| BucketName | string | Storage Space Name | Yes |
| RefererStatus | string | Enable or disable referer anti-leeching; Disabling anti-leeching will clear the anti-leeching parameter settings, enabling anti-leeching must specify RefererType, Referers; Enable: on, Disable: off; | Yes |
| RefererAllowNull | boolean | When RefererType is set to whitelist, setting RefererAllowNull to false means that empty referer access is not allowed, while setting it to true means that empty referer access is allowed; This parameter is set to true by default. | No |
| RefererType | int | Anti-theft chain Referer type, supports three types, 1 represents setting a blacklist, 2 represents setting a whitelist, 3 represents setting both blacklist and whitelist; (1 and 2 are for backward compatibility, subsequent calls should only pass type 3) This parameter must be filled in when RefererStatus is “on”; | No |
| Referers.N | string | Anti-theft chain Referer rule, supports regular expressions (does not support the symbol ’;’), this field has been deprecated, please use WhiteList.n or BlackList.n | No |
| WhiteList.N | string | An item in the whitelist | No |
| BlackList.N | string | An item in the blacklist | No |
Response Field
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
| Action | string | Operation command name. | Yes |
| Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.sigcalcloud.com/?Action=SetUFileReferer
&Region=cn-zj
&ProjectId=EhCcaLxv
&BucketName=XvqwhKrY
&RefererType=ZzOlNzdj
&Referers.n=iaEJuvtY
&NullReferer=MrViJqjQ
&RefererStatus=开启:on; 关闭:off;
&RefererStatus=开启:on; 关闭:off;
&WhiteList.n=ZTziAPAx
&BlackList.n=gRpnOElW
&WhiteList.n=jCEtMJTO
&BlackList.n=CuicHvDo
&WhiteList.n=dQxkpotm
&BlackList.n=DhqOJukGResponse Example
{
"Action": "SetUFileRefererResponse",
"RetCode": 0
}