Parameter | Description | Type | Required |
Domain | The custom request domain name used to call a bucket or object API. You can use a template, such as "{Bucket}.cos.{Region}.myqcloud.com" which will use the bucket and region passed in the replacement parameters when an API is called. | String | No |
Protocol | The protocol used when the request is made. Valid values: https: , http: . By default, http: is used when the current page is determined to be in http: format; otherwise, https: is used | String | No |
var cos = new COS({Domain: '{Bucket}.file.myqcloud.com', // Custom acceleration domain name (supports using a template). In this sample, the value of {Bucket} will be replaced by the value passed in the request.Protocol: 'https:', // Request protocol, which can be 'https:' or 'http:'});
var cos = new COS({Domain: 'example-cdn-domain.com', // Custom acceleration domain nameProtocol: 'https:', // Request protocol, which can be 'https:' or 'http:'});
var cos = new COS({Domain: 'example-cos-domain.com', // Custom origin server domainProtocol: 'https:', // Request protocol, which can be 'https:' or 'http:'});
var cos = new COS({UseAccelerate: true, // Set this parameter to “true” to use a global acceleration domain.Protocol: 'https:', // Request protocol, which can be 'https:' or 'http:'});
Apakah halaman ini membantu?