代码拉取完成,页面将自动刷新
CdnComponent:
Component: cdn
Provider: alibaba
Properties:
# 1. 预热源站内容到缓存节点/刷新节点上的文件内容 不需要配置参数,通过命令行参数传递即可
# 2. CdnDomain 相关参数
CdnDomain:
CdnType: web # * 加速域名的业务类型
DomainName: anycodes.cn # * 加速域名
ResourceGroupId: 123 # 资源分组
Sources: # 源站信息
Type: oss
Content: 0.0.0.0
Port: 443
Priority: 20
Weight: 10
CheckUrl: www.yourdomain.com/test.html # 健康检查URL
Scope: domestic # 业务类型
TopLevelDomain: yourTopLevelDomain # 顶级接入域
# 3. 添加资源标签
Tags: # 标签
- Key: key1
Value: Value1
# 4. 批量配置域名
### ipv6
Ipv6:
Enable: true
Region: *
### 其他配置
Others:
GreenManager: enable # 图片鉴黄
### 强制 http/https
Force: Http / Https # 强制http/https
### 访问控制
AccessControl:
Referer: # 防盗链
White:
AllowEmpty: true
List:
- aa
Black:
AllowEmpty: true
List:
- aa
Ip: # ip黑白名单
WhiteList:
- aa
BlackList:
- aa
UserAgent: # UA黑白名单
WhiteList:
- aaaa
BlackList:
- aa
Auth: # 阿里鉴权
Type: Type
Delta: Delta # 默认1800,和控制台一致
Key1: Key1
Key2: Key2
### 性能优化
Performance:
Gzip: enable # 智能压缩
Tesla: enable # 页面优化
Brotli: ebable # Brotli压缩
RemoveArgs: # 过滤参数
Enable: true
KeepOSSArgs: enable
Args:
- a
- b
HashkeyArgs: # 保留参数
Enable: true
KeepOSSArgs: enable
Args:
- a
- b
### 视频相关
Video:
Range: range
VideoSeek:
Enable: true
FlvSeek:
ByTime: enable
Start: a
End: a
Mp4Seek:
Start: a
End: a
VideoSplit: enable # 5. 设置加速域名的证书信息
### 回源配置
BackToOrigin:
RequestHost: #回源HOST
Domain: anycodes.cn
SNI: sni
Timeout: 10
SetResponseHeader:
- Key: Content-Type
Value: a
SetRequestHeader:
- Key: Content-Type
Value: a
ForwardScheme: # 回源协议
Enable: true
Origin: http
ArgumentRewrite: # 参数改写
Delete:
- a
Save:
- a
IgnoreAll: enable
Add:
- a
Modify:
- a
UrlRewrite:
- SourceUrl: a
TargetUrl: a
Flag: break
EnhanceBreak: a
ResponseHeader:
- Key: Content-Type
Value: a
OperationType: add
Duplicate: Duplicate
HeaderSource: HeaderSource
HeaderDestination: aa
MatchAll: MatchAll
### 缓存配置
Cache:
FileTTL:
- TTL: 10
FileType: txt
Weight: 10
PathTTL:
- TTL: 10
Path: /a
Weight: 10
DefaultPages:
- Code: 404
Page: index.html
Rewrite:
- Regex: Regex
Replacement: Replacement
Flag: redirect
SetResponseHeader:
- Key: Content-Type
Value: a
OperationType: add
Duplicate: Duplicate
HeaderSource: HeaderSource
HeaderDestination: aa
MatchAll: MatchAll
### https配置
Https:
Status: true
CertName: yourCertName
CertType: upload
ForceSet: ForceSet
PrivateKey: './certificates/privateKey.pem'
Certificate: './certificates/certificate.pem'
Http2: enable
TLS:
Tls10: enable
Tls11: enable
Tls12: enable
Tls13: enable
HSTS:
Enabled: true
MaxAge: 10
IncludeSubdomains: enable
### refresh 刷新配置
Refresh:
Path: prettyzxx.com/image/1.png\nprettyzxx.com/image/2.png # splitting with \n or \r\n
Type: File # File or Directory
### preload 预热配置
Preload:
Path: prettyzxx.com/image/1.png\nprettyzxx.com/image/2.png
Area: domestic # 1. overseas, for all over the world except china mainland 2. domestic, for china mainland only 3. (empty) all over the world
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。