You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Common configuration scenarios
Setting up hotlink protection
Copy page
Download PDF
Setting up hotlink protection
When a browser sends a request to a web server, the request header includes a "Referer" field that indicates the origin of the request. TOS can evaluate and decide whether to allow or deny access from that source based on the Referer allowlist that you configure.​
Steps​
  1. Log in to the TOS console.​
  1. In the left navigation pane, click Buckets.​
  1. In the top menu bar, select the project of the bucket you want to manage.​
  1. On the Buckets page, click the name of the bucket.​
  1. In the left navigation pane, select Permissions > Bucket policies.​
  1. Edit the policy using your preferred view.​
  • ​
    Visual view
    JSON view
    ​
    1. Click Create policy.​
    1. At the bottom of the Create Bucket Authorization Policy page, select Custom Policy and click Next.​
    1. Configure the following parameters.​
    • ​
      Category​
      Parameter​
      Description​
      Basic configuration​
      Policy configuration method​
      Use the default option, i.e., Visual view.​
      ​
      Policy name​
      Enter a name for the policy. The policy name must be unique within a bucket.​
      Effect​
      Effect​
      Select the effect of the policy. In this example, use the default value.​
      • Allow (Default): Allows the matched requests.​
      • Deny: Denies the matched requests.​
      Authorized user​
      Authorized user​
      Select All users.​
      Resource​
      Resource scope​
      Select Current bucket, Objects in bucket, and All objects.​
      Action​
      General Action​
      Check the box for * to select all actions.​
      ​
      Bucket Action​
      Leave this section empty.​
      ​
      Object Action​
      Leave this section empty.​
      ​
      Operational strategy​
      Use the default option, i.e., Include the above actions. This option allows users to perform the specified actions.​
      Condition (Optional)​
      -​
      Click the Add Field icon. Then, set Key to Referer, Conditional operator to Equal To, and Value to http://console.volcengine.com.​
      tip​
      • The like operator supports the wildcard (*). For more information about conditional operators, see Conditions.​
      • Common domains, wildcard domains, and IP addresses are supported.​
      • Start an address with http:// or https://.​
      • Separate multiple addresses with commas (,).​
      ​
    1. Save your settings by clicking Next.​
    1. After verifying the details, click Create.​
    • Then, you will see the bucket policy that you just created in the policy list.​
    ​
  • ​
Last updated: 2026.08.14 16:23:29