CDN configuration struct.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
endpoint | String.t() | Yes | CDN domain URL |
| provider | :cloudfront | :qiniu | :aliyun | Yes | CDN provider |
| module | module() | Yes | Resolved CDN adapter module |
| aws_key_id | String.t() | CloudFront | Key pair ID |
| aws_private_key | String.t() | CloudFront | RSA private key (PEM) |
Aliyun fields: aliyun_auth_key (required), aliyun_auth_type (:a, :b,
:c, :f; default :a), aliyun_auth_ttl (console TTL, default 1800),
aliyun_auth_format (:path or :query for C), aliyun_sign_param (default
"sign"), aliyun_time_param (default "time") and aliyun_time_format
(:decimal or :hex for F).
Example
cdn: [
provider: :cloudfront,
endpoint: "https://d123456789.cloudfront.net",
aws_key_id: "K2XXXXXXXXXXXXX",
aws_private_key: "-----BEGIN RSA PRIVATE KEY-----\n..."
]
Summary
Types
@type t() :: %ExOss.Client.CDN{ aliyun_auth_format: :path | :query, aliyun_auth_key: String.t() | nil, aliyun_auth_ttl: pos_integer(), aliyun_auth_type: :a | :b | :c | :f, aliyun_sign_param: String.t(), aliyun_time_format: :decimal | :hex, aliyun_time_param: String.t(), aws_key_id: String.t() | nil, aws_private_key: String.t() | nil, endpoint: String.t(), module: module() | nil, provider: :cloudfront | :qiniu | :aliyun }