From 8893dbed8f3558a4512a562fc8a9e0082ab5ea44 Mon Sep 17 00:00:00 2001 From: "Oliver.W" Date: Fri, 22 Oct 2021 16:11:36 +0800 Subject: [PATCH 1/7] Update serverless.component.yml (#41) --- serverless.component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.component.yml b/serverless.component.yml index c90f517..04f5453 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -2,7 +2,7 @@ name: website version: 0.2.3 author: 'Tencent Cloud, Inc.' org: 'Tencent Cloud, Inc.' -description: Deploy a static website on Tencent Cloud. +description: 静态网站组件,允许用户构建部署静态站点到腾讯 COS。适合用来构建部署静态网站。 keywords: 'tencent, serverless, website' repo: 'https://github.com/serverless-components/tencent-website' readme: 'https://github.com/serverless-components/tencent-website/tree/master/README.md' From 38e5744e1fd6ecde9028e527f1f0d9ecebf07c20 Mon Sep 17 00:00:00 2001 From: mamietian Date: Fri, 22 Oct 2021 18:41:12 +0800 Subject: [PATCH 2/7] chore(release): version 0.2.4 --- serverless.component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.component.yml b/serverless.component.yml index 04f5453..02c9ad8 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: website -version: 0.2.3 +version: 0.2.4 author: 'Tencent Cloud, Inc.' org: 'Tencent Cloud, Inc.' description: 静态网站组件,允许用户构建部署静态站点到腾讯 COS。适合用来构建部署静态网站。 From 1085e43636b843f329f4ca7367f0b11c93b93136 Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Mon, 29 Nov 2021 11:02:12 +0800 Subject: [PATCH 3/7] docx:update configure description (#43) --- docs/configure.md | 264 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 238 insertions(+), 26 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 9c2d83d..a000474 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -93,20 +93,20 @@ inputs: 主要参数描述 -| 参数名称 | 必选 | 类型 | 默认值 | 描述 | -| ------------------ | :--: | :-------------- | :------------: | :---------------------------------------------------------------------------------------- | -| src | 是 | [Src](#Src)[] | | 该项目的代码信息,参数参考执行目录 | -| bucket | 是 | string | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 | -| region | 否 | string | `ap-guangzhou` | 代码上传所在的 cos 区域。区。 | -| replace | 否 | boolean | `false` | 是否是替换式部署,如果为 `true`,部署时将 `先删除对应 bucket 的所有旧文件`。 | -| protocol | 否 | string | `https` | 请求协议。`https` 或 `http` | +| 参数名称 | 必选 | 类型 | 默认值 | 描述 | +| ------------------ | :--: | :-------------- | :------------: | :----------------------------------------------------------- | +| src | 是 | [Src](#Src) | | 该项目的代码信息,参数参考执行目录 | +| bucket | 是 | string | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 | +| region | 否 | string | `ap-guangzhou` | 代码上传所在的 cos 区域。区。 | +| replace | 否 | boolean | `false` | 是否是替换式部署,如果为 `true`,部署时将 `先删除对应 bucket 的所有旧文件`。 | +| protocol | 否 | string | `https` | 请求协议。`https` 或 `http` | | env | 否 | [Env](#Env) | | 环境变量参数文件。会将 env 下配置的参数写入 env.js 文件中,将该文件打包上传到你的代码里。 | -| cors | 否 | [Cors](#Cors)[] | | 跨域访问配置 | -| hosts | 否 | [Cdn](#Cdn)[] | | CND 加速域名配置 | -| autoSetupAcl | 否 | boolean | `true` | 自动配置 bucket 访问权限为 ”公有读私有写“ | -| autoSetupPolicy | 否 | boolean | `false` | 自动配置 bucket 的 Policy 权限为 ”所有用户资源可读“ | -| disableErrorStatus | 否 | boolean | `false` | 是否禁用错误码,默认 false,不存在文件会返回 404;如果禁用,就会返回 200 | -| ignoreHtmlExt | 否 | boolean | `false` | 是否忽略 html 扩展名,默认 false | +| cors | 否 | [Cors](#Cors)[] | | 跨域访问配置 | +| hosts | 否 | [Cdn](#Cdn)[] | | CND 加速域名配置 | +| autoSetupAcl | 否 | boolean | `true` | 自动配置 bucket 访问权限为 ”公有读私有写“ | +| autoSetupPolicy | 否 | boolean | `false` | 自动配置 bucket 的 Policy 权限为 ”所有用户资源可读“ | +| disableErrorStatus | 否 | boolean | `false` | 是否禁用错误码,默认 false,不存在文件会返回 404;如果禁用,就会返回 200 | +| ignoreHtmlExt | 否 | boolean | `false` | 是否忽略 html 扩展名,默认 false | > 针对 COS 静态资源托管,通常需要配置所有用户公有读私有写,website 组件因此默认通过配置 `autoSetupAcl` 为 `true`,来帮助用户自动配置访问权限为 `公有读私有写`,由于 COS 针对账号的 ACL 配置条数有 1000 限制,当子账号很多的情况下,通过 `autoSetupAcl` 来配置 ACL 可能超过上限。此时用户可以配置 `autoSetupAcl` 为 `false`,同时配置 `autoSetupPolicy` 为 `true`,来解决此问题。 @@ -129,13 +129,13 @@ inputs: 参考: https://cloud.tencent.com/document/product/436/8279 -| 参数 | 必选 | 类型 | Description | -| -------------- | :--: | :------- | :--------------------------------------------------------------------------------------------- | -| id | 否 | string | 规则 ID | -| allowedMethods | 是 | string[] | 允许的 HTTP 操作,枚举值:GET,PUT,HEAD,POST,DELETE | -| allowedOrigins | 是 | string[] | 允许的访问来源,支持通配符`*`,格式为:`协议://域名[:端口]`,例如:`http://www.qq.com` | -| allowedHeaders | 是 | | 在发送 OPTIONS 请求时告知服务端,接下来的请求可以使用哪些自定义的 HTTP 请求头部,支持通配符`*` | -| maxAgeSeconds | 是 | | 设置 OPTIONS 请求得到结果的有效期 | +| 参数 | 必选 | 类型 | Description | +| -------------- | :--: | :------- | :----------------------------------------------------------- | +| id | 否 | string | 规则 ID | +| allowedMethods | 是 | string[] | 允许的 HTTP 操作,枚举值:GET,PUT,HEAD,POST,DELETE | +| allowedOrigins | 是 | string[] | 允许的访问来源,支持通配符`*`,格式为:`协议://域名[:端口]`,例如:`http://www.qq.com` | +| allowedHeaders | 是 | string[] | 在发送 OPTIONS 请求时告知服务端,接下来的请求可以使用哪些自定义的 HTTP 请求头部,支持通配符`*` | +| maxAgeSeconds | 是 | number | 设置 OPTIONS 请求得到结果的有效期 | ### Cdn @@ -150,11 +150,11 @@ CDN 配置 | refreshCdn | 否 | [RefreshCdn](#RefreshCdn) | | 刷新 CDN 相关配置 | | pushCdn | 否 | [PushCdn](#PushCdn) | | 预热 CDN 相关配置(#pushCdn) | | host | 是 | string | | 需要接入的 CDN 域名。 | -| https | 否 | [Https](https://cloud.tencent.com/document/api/228/30987#Https) | | Https 加速配置 | -| cacheKey | 否 | [CacheKey](https://cloud.tencent.com/document/api/228/30987#CacheKey) | | 节点缓存键配置 | -| cache | 否 | [Cache](https://cloud.tencent.com/document/api/228/30987#Cache) | | 缓存过期时间配置 | -| referer | 否 | [Referer](https://cloud.tencent.com/document/api/228/30987#Referer) | '' | 防盗链设置 | -| ipFilter | 否 | [IpFilter](https://cloud.tencent.com/document/api/228/30987#IpFilter) | '' | IP 黑白名单配置 | +| https | 否 | [Https](#Https) | | Https 加速配置 | +| cacheKey | 否 | [CacheKey](#CacheKey) | | 节点缓存键配置 | +| cache | 否 | [Cache](#Cache) | | 缓存过期时间配置 | +| referer | 否 | [Referer](#Referer) | '' | 防盗链设置 | +| ipFilter | 否 | [IpFilter](#IpFilter) | '' | IP 黑白名单配置 | 使用中国境外加速、全球加速时,需要先开通中国境外加速服务。 @@ -168,7 +168,7 @@ global:全球加速 > 注意:`async` 参数对于配置多个 CDN 域名需求,或者在 CI 流程中时,建议配置成 `true`,不然会导致 serverless cli 执行超时,或者 CI 流程超时。 -更多配置,请移至官方云 API 文档:https://cloud.tencent.com/document/product/228/41123 +更多配置详情,请移至官方云 API 文档:https://cloud.tencent.com/document/product/228/41123 #### RefreshCdn @@ -182,6 +182,218 @@ global:全球加速 | -------- | :--: | :------- | ---- | ------------------- | | urls | 否 | string[] | [] | 需要预热的 CDN URLs | +#### Https + +域名 https 加速配置 + +| 参数名称 | 必选 | 类型 | 默认 | 描述 | +| -------------- | :--: | ------------------------- | ---- | ------------------------------------------------------------ | +| Switch | 是 | string | | https 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| Http2 | 否 | string | | http2 配置开关。on: 开启;off:关闭;初次启用 https 加速会默认开启 http2 配置 | +| OcspStapling | 否 | string | off | OCSP 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| VerifyClient | 否 | string | off | 客户端证书校验功能。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| CertInfo | 否 | [ServerCert](#ServerCert) | | 服务端证书配置信息 | +| ClientCertInfo | 否 | [ClientCert](#ClientCert) | | 客户端证书配置信息 | +| Spdy | 否 | string | off | Spdy 配置开关。on: 开启;off:关闭 | +| SslStatus | 否 | string | | https 证书部署状态。closed:已关闭;deploying:部署中;deployed:部署成功;failed:部署失败 | +| Hsts | 否 | [Hsts](#Hsts) | | Hsts配置 | +| TlsVersion | 否 | string[] | | Tls版本设置,仅支持部分Advance域名,支持设置 TLSv1, TLSV1.1, TLSV1.2, TLSv1.3,修改时必须开启连续的版本 | + +#### ServerCert + +https 加速服务端证书配置 + +| 参数名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :-------- | ---- | :------------------------------------------------------ | +| CertId | 否 | string | | 服务器证书 ID 在 SSL 证书管理进行证书托管时自动生成 | +| CertName | 否 | string | | 服务器证书名称 在 SSL 证书管理进行证书托管时自动生成 | +| Certificate | 否 | string | | 服务器证书信息 上传自有证书时必填,需要包含完整的证书链 | +| PrivateKey | 否 | string | | 服务器密钥信息 上传自有证书时必填 | +| ExpireTime | 否 | timestamp | | 证书过期时间 作为入参配置时无需填充 | +| DeployTime | 否 | timestamp | | 证书颁发时间 作为入参配置时无需填充 | +| Message | 否 | string | | 证书备注信息 | + +#### ClientCert + +https 客户端证书配置 + +| 参数名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :-------- | ---- | :----------------------------------------- | +| Certificate | 是 | string | | 客户端证书 PEM 格式,需要进行 Base 64 编码 | +| CertName | 否 | string | | 客户端证书名称 | +| ExpireTime | 否 | timestamp | | 证书过期时间 作为入参时无需填充 | +| DeployTime | 否 | timestamp | | 证书颁发时间 作为入参时无需填充 | + +#### Hsts + +HSTS 配置 + +| 参数名称 | 必选 | 类型 | 默认 | 描述 | +| :---------------- | ---- | :----- | ---- | :---------------------- | +| Switch | 是 | string | | 是否开启,on或off。 | +| MaxAge | 否 | number | | MaxAge数值 | +| IncludeSubDomains | 否 | string | | 是否包含子域名,on或off | + +#### CacheKey + +缓存键配置 + +| 参数名称 | 必选 | 类型 | 默认 | 描述 | +| :----------- | ---- | :-------------------------------- | ---- | :----------------------------------------------------------- | +| FullUrlCache | 否 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | +| IgnoreCase | 否 | string | | 是否忽略大小写缓存 | +| Querystring | 否 | [QuerystringKey](#QuerystringKey) | | CacheKey中包含请求参数 | +| Cookie | 否 | [CookieKey](#CookieKey) | | CacheKey中包含Cookie | +| Header | 否 | [HeaderKey](#HeaderKey) | | CacheKey中包含请求头部 | +| CacheTag | 否 | [CacheTagKey](#CacheTagKey) | | CacheKey中包含自定义字符串 | +| Scheme | 否 | [SchemeKey](#SchemeKey) | | CacheKey中包含请求协议 | +| KeyRules | 否 | [KeyRule](#KeyRule)[] | | 分路径缓存键配置 | + +#### QuerystringKey + +组成CacheKey的一部分 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :------ | ---- | :----- | :--- | :----------------------------------------------------------- | +| Switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | +| Reorder | 否 | string | | 是否重新排序 | +| Action | 否 | string | | includeAll \| excludeAll \| includeCustom \| excludeAll 使用/排除部分url参数 | +| Value | 否 | string | | 使用/排除的url参数数组,';' 分割 | + +#### CookieKey + +组成CacheKey的一部分 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :---------------------------------------- | +| Switch | 是 | string | | on \| off 是否使用Cookie作为Cache的一部分 | +| Value | 否 | string | | 使用的cookie,';' 分割 | + +#### HeaderKey + +组成CacheKey + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :--------------------------------- | +| Switch | 否 | string | | 是否组成Cachekey | +| Value | 否 | string | | 组成CacheKey的header数组,';' 分割 | + +#### CacheTagKey + +组成CacheKey的一部分 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :----------------------------------- | +| Switch | 是 | string | | 是否使用CacheTag作为CacheKey的一部分 | +| Value | 否 | string | | 自定义CacheTag的值 | + +#### SchemeKey + +作为CacheKey的一部分 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :-------------------------------------------- | +| Switch | 是 | string | | on \| off 是否使用scheme作为cache key的一部分 | + +#### KeyRule + +缓存键分路径配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----------- | ---- | :---------------------------------- | :--- | :----------------------------------------------------------- | +| RulePaths | 是 | Array of string | | CacheType 对应类型下的匹配内容: file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| RuleType | 是 | string | | 规则类型: file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| FullUrlCache | 是 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | +| IgnoreCase | 是 | string | | 是否忽略大小写缓存 | +| Querystring | 是 | [RuleQuerystring](#RuleQuerystring) | | CacheKey中包含请求参数 | +| RuleTag | 是 | string | | 路径缓存键标签,传 user | + +#### RuleQuerystring + +路径保留参数配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :-------------------------------------- | +| Switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | +| Action | 是 | string | | includeCustom 包含部分url参数 | +| Value | 是 | string | | 使用/排除的url参数数组,';' 分割 | + +#### Cache + +节点缓存过期时间配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :----------------------------------------------------------- | :--- | :------------------- | +| SimpleCache | 否 | [SimpleCache](https://cloud.tencent.com/document/api/228/30987#SimpleCache) | | 基础缓存过期时间配置 | +| RuleCache | 否 | [RuleCache](#RuleCache)[] | | 高级路径缓存配置 | + +#### SimpleCache + +缓存配置基础版本 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----------------- | ---- | :------------------------------------ | :--- | :----------------------------------------------------------- | +| CacheRules | 是 | [SimpleCacheRule](#SimpleCacheRule)[] | | 缓存过期时间规则 | +| FollowOrigin | 是 | string | | 遵循源站 Cache-Control: max-age 配置 on:开启 off:关闭 | +| IgnoreCacheControl | 是 | string | off | 强制缓存 on:开启 off:关闭,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | +| IgnoreSetCookie | 是 | string | off | 忽略源站的Set-Cookie头部 on:开启 off:关闭 | +| CompareMaxAge | 是 | string | off | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | +| Revalidate | 否 | [Revalidate](#Revalidate) | | 总是回源站校验 | + +#### RuleCache + +缓存配置分路径版本 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :---------------------------------- | :--- | :----------------------------------------------------------- | +| RulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| CacheConfig | 是 | [RuleCacheConfig](#RuleCacheConfig) | | 缓存配置 | + +#### Referer + +Referer 黑白名单配置,默认为关闭状态 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----------- | ---- | :---------------------------- | :--- | :------------------------------------------ | +| Switch | 是 | string | | referer 黑白名单配置开关 on:开启 off:关闭 | +| RefererRules | 否 | [RefererRule](#RefererRule)[] | | referer 黑白名单配置规则 | + +#### RefererRule + +Referer 黑白名单配置规则,针对特定资源生效 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :------- | :--- | :----------------------------------------------------------- | +| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | +| RulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | +| RefererType | 是 | string | | referer 配置类型 whitelist:白名单 blacklist:黑名单 | +| Referers | 是 | string[] | | referer 内容列表列表 | +| AllowEmpty | 是 | Boolean | | 是否允许空 referer true:允许空 referer false:不允许空 referer | + +#### IpFilter + +IP 黑白名单配置,默认为关闭状态 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :---------- | ---- | :-------------------------------------- | :--- | :----------------------------------------------------------- | +| Switch | 是 | string | | IP 黑白名单配置开关 on:开启 off:关闭 | +| FilterType | 否 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | +| Filters | 否 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | +| FilterRules | 否 | [IpFilterPathRule](#IpFilterPathRule)[] | | IP 黑白名单分路径配置,白名单功能 | +| ReturnCode | 否 | number | | IP 黑白名单验证失败时返回的 HTTP Code 合法值: 400~499 | + +#### IpFilterPathRule + +IP黑白名单分路径配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :--------- | ---- | :------- | :--- | :----------------------------------------------------------- | +| FilterType | 是 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | +| Filters | 是 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | +| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | +| RulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | + ### Env 环境变量参数。serverless 部署时会将 `env` 下配置的参数写入 `env.js` 文件中,将该文件打包上传到相对于 `src` 的 `envPath` 目录,默认为 `src` 指定目录。 From 33a0f7267aa99087049df590f3a4cdf0a6813f00 Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:40:25 +0800 Subject: [PATCH 4/7] docx:update configure description (#44) --- docs/configure.md | 68 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index a000474..d32d308 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -301,7 +301,7 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------- | ---- | :---------------------------------- | :--- | :----------------------------------------------------------- | -| RulePaths | 是 | Array of string | | CacheType 对应类型下的匹配内容: file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| RulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | | RuleType | 是 | string | | 规则类型: file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | | FullUrlCache | 是 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | | IgnoreCase | 是 | string | | 是否忽略大小写缓存 | @@ -324,7 +324,7 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :----------------------------------------------------------- | :--- | :------------------- | -| SimpleCache | 否 | [SimpleCache](https://cloud.tencent.com/document/api/228/30987#SimpleCache) | | 基础缓存过期时间配置 | +| SimpleCache | 否 | [SimpleCache](#SimpleCache) | | 基础缓存过期时间配置 | | RuleCache | 否 | [RuleCache](#RuleCache)[] | | 高级路径缓存配置 | #### SimpleCache @@ -335,11 +335,30 @@ HSTS 配置 | :----------------- | ---- | :------------------------------------ | :--- | :----------------------------------------------------------- | | CacheRules | 是 | [SimpleCacheRule](#SimpleCacheRule)[] | | 缓存过期时间规则 | | FollowOrigin | 是 | string | | 遵循源站 Cache-Control: max-age 配置 on:开启 off:关闭 | -| IgnoreCacheControl | 是 | string | off | 强制缓存 on:开启 off:关闭,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | -| IgnoreSetCookie | 是 | string | off | 忽略源站的Set-Cookie头部 on:开启 off:关闭 | -| CompareMaxAge | 是 | string | off | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | +| IgnoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | +| IgnoreSetCookie | 是 | string | | 忽略源站的Set-Cookie头部 on:开启 off:关闭 | +| CompareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | | Revalidate | 否 | [Revalidate](#Revalidate) | | 总是回源站校验 | +#### SimpleCacheRule + +缓存过期规则配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :------------ | ---- | :------- | :--- | :----------------------------------------------------------- | +| CacheType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| CacheContents | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| CacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | + +#### Revalidate + +是否回源站校验 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :------------------------- | +| Switch | 是 | String | | on \| off 是否总是回源校验 | +| Path | 否 | String | | 只在特定请求路径回源站校验 | + #### RuleCache 缓存配置分路径版本 @@ -350,6 +369,45 @@ HSTS 配置 | RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | | CacheConfig | 是 | [RuleCacheConfig](#RuleCacheConfig) | | 缓存配置 | +#### RuleCacheConfig + +路径缓存缓存配置(三种缓存模式中选取一种) + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----------- | ---- | :-------------------------------------------------- | :--- | :----------- | +| Cache | 是 | [CacheConfigCache](#CacheConfigCache) | | 缓存配置 | +| NoCache | 是 | [CacheConfigNoCache](#CacheConfigNoCache) | | 不缓存配置 | +| FollowOrigin | 是 | [CacheConfigFollowOrigin](#CacheConfigFollowOrigin) | | 遵循源站配置 | + +#### CacheConfigCache + +路径缓存缓存配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----------------- | ---- | :----- | :--- | :----------------------------------------------------------- | +| Switch | 是 | string | | 缓存配置开关 on:开启 off:关闭 | +| CacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | +| CompareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | +| IgnoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭 默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | +| IgnoreSetCookie | 是 | string | | 当源站返回Set-Cookie头部时,节点是否缓存该头部及body on:开启,不缓存该头部及body off:关闭,遵循用户自定义的节点缓存规则 | + +#### CacheConfigNoCache + +路径缓存不缓存配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :--------- | ---- | :----- | :--- | :-------------------------------- | +| Switch | 是 | string | | 不缓存配置开关 on:开启 off:关闭 | +| Revalidate | 是 | string | | 总是回源站校验 on:开启 off:关闭 | + +#### CacheConfigFollowOrigin + +路径缓存遵循源站配置 + +| 名称 | 必选 | 类型 | 默认 | 描述 | +| :----- | ---- | :----- | :--- | :---------------------------------- | +| Switch | 是 | string | | 遵循源站配置开关 on:开启 off:关闭 | + #### Referer Referer 黑白名单配置,默认为关闭状态 From 2f980c0dc2170ce3f98cb39338a2e1ef7aba77fb Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:01:37 +0800 Subject: [PATCH 5/7] docx:update configure description (#45) --- docs/configure.md | 190 +++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index d32d308..2278b76 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -188,16 +188,16 @@ global:全球加速 | 参数名称 | 必选 | 类型 | 默认 | 描述 | | -------------- | :--: | ------------------------- | ---- | ------------------------------------------------------------ | -| Switch | 是 | string | | https 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | -| Http2 | 否 | string | | http2 配置开关。on: 开启;off:关闭;初次启用 https 加速会默认开启 http2 配置 | -| OcspStapling | 否 | string | off | OCSP 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | -| VerifyClient | 否 | string | off | 客户端证书校验功能。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | -| CertInfo | 否 | [ServerCert](#ServerCert) | | 服务端证书配置信息 | -| ClientCertInfo | 否 | [ClientCert](#ClientCert) | | 客户端证书配置信息 | -| Spdy | 否 | string | off | Spdy 配置开关。on: 开启;off:关闭 | -| SslStatus | 否 | string | | https 证书部署状态。closed:已关闭;deploying:部署中;deployed:部署成功;failed:部署失败 | -| Hsts | 否 | [Hsts](#Hsts) | | Hsts配置 | -| TlsVersion | 否 | string[] | | Tls版本设置,仅支持部分Advance域名,支持设置 TLSv1, TLSV1.1, TLSV1.2, TLSv1.3,修改时必须开启连续的版本 | +| switch | 是 | string | | https 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| http2 | 否 | string | | http2 配置开关。on: 开启;off:关闭;初次启用 https 加速会默认开启 http2 配置 | +| ocspStapling | 否 | string | off | OCSP 配置开关。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| verifyClient | 否 | string | off | 客户端证书校验功能。on: 开启;off:关闭;此字段可能返回 null,表示取不到有效值 | +| certInfo | 否 | [ServerCert](#ServerCert) | | 服务端证书配置信息 | +| clientCertInfo | 否 | [ClientCert](#ClientCert) | | 客户端证书配置信息 | +| spdy | 否 | string | off | Spdy 配置开关。on: 开启;off:关闭 | +| sslStatus | 否 | string | | https 证书部署状态。closed:已关闭;deploying:部署中;deployed:部署成功;failed:部署失败 | +| hsts | 否 | [Hsts](#Hsts) | | Hsts配置 | +| tlsVersion | 否 | string[] | | Tls版本设置,仅支持部分Advance域名,支持设置 TLSv1, TLSv1.1, TLSv1.2, TLSv1.3,修改时必须开启连续的版本 | #### ServerCert @@ -205,13 +205,13 @@ https 加速服务端证书配置 | 参数名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :-------- | ---- | :------------------------------------------------------ | -| CertId | 否 | string | | 服务器证书 ID 在 SSL 证书管理进行证书托管时自动生成 | -| CertName | 否 | string | | 服务器证书名称 在 SSL 证书管理进行证书托管时自动生成 | -| Certificate | 否 | string | | 服务器证书信息 上传自有证书时必填,需要包含完整的证书链 | -| PrivateKey | 否 | string | | 服务器密钥信息 上传自有证书时必填 | -| ExpireTime | 否 | timestamp | | 证书过期时间 作为入参配置时无需填充 | -| DeployTime | 否 | timestamp | | 证书颁发时间 作为入参配置时无需填充 | -| Message | 否 | string | | 证书备注信息 | +| certId | 否 | string | | 服务器证书 ID 在 SSL 证书管理进行证书托管时自动生成 | +| certName | 否 | string | | 服务器证书名称 在 SSL 证书管理进行证书托管时自动生成 | +| certificate | 否 | string | | 服务器证书信息 上传自有证书时必填,需要包含完整的证书链 | +| privateKey | 否 | string | | 服务器密钥信息 上传自有证书时必填 | +| expireTime | 否 | timestamp | | 证书过期时间 作为入参配置时无需填充 | +| deployTime | 否 | timestamp | | 证书颁发时间 作为入参配置时无需填充 | +| message | 否 | string | | 证书备注信息 | #### ClientCert @@ -219,10 +219,10 @@ https 客户端证书配置 | 参数名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :-------- | ---- | :----------------------------------------- | -| Certificate | 是 | string | | 客户端证书 PEM 格式,需要进行 Base 64 编码 | -| CertName | 否 | string | | 客户端证书名称 | -| ExpireTime | 否 | timestamp | | 证书过期时间 作为入参时无需填充 | -| DeployTime | 否 | timestamp | | 证书颁发时间 作为入参时无需填充 | +| certificate | 是 | string | | 客户端证书 PEM 格式,需要进行 Base 64 编码 | +| certName | 否 | string | | 客户端证书名称 | +| expireTime | 否 | timestamp | | 证书过期时间 作为入参时无需填充 | +| deployTime | 否 | timestamp | | 证书颁发时间 作为入参时无需填充 | #### Hsts @@ -230,9 +230,9 @@ HSTS 配置 | 参数名称 | 必选 | 类型 | 默认 | 描述 | | :---------------- | ---- | :----- | ---- | :---------------------- | -| Switch | 是 | string | | 是否开启,on或off。 | -| MaxAge | 否 | number | | MaxAge数值 | -| IncludeSubDomains | 否 | string | | 是否包含子域名,on或off | +| switch | 是 | string | | 是否开启,on或off。 | +| maxAge | 否 | number | | MaxAge数值 | +| includeSubDomains | 否 | string | | 是否包含子域名,on或off | #### CacheKey @@ -240,14 +240,14 @@ HSTS 配置 | 参数名称 | 必选 | 类型 | 默认 | 描述 | | :----------- | ---- | :-------------------------------- | ---- | :----------------------------------------------------------- | -| FullUrlCache | 否 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | -| IgnoreCase | 否 | string | | 是否忽略大小写缓存 | -| Querystring | 否 | [QuerystringKey](#QuerystringKey) | | CacheKey中包含请求参数 | -| Cookie | 否 | [CookieKey](#CookieKey) | | CacheKey中包含Cookie | -| Header | 否 | [HeaderKey](#HeaderKey) | | CacheKey中包含请求头部 | -| CacheTag | 否 | [CacheTagKey](#CacheTagKey) | | CacheKey中包含自定义字符串 | -| Scheme | 否 | [SchemeKey](#SchemeKey) | | CacheKey中包含请求协议 | -| KeyRules | 否 | [KeyRule](#KeyRule)[] | | 分路径缓存键配置 | +| fullUrlCache | 否 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | +| ignoreCase | 否 | string | | 是否忽略大小写缓存 | +| querystring | 否 | [QuerystringKey](#QuerystringKey) | | CacheKey中包含请求参数 | +| cookie | 否 | [CookieKey](#CookieKey) | | CacheKey中包含Cookie | +| header | 否 | [HeaderKey](#HeaderKey) | | CacheKey中包含请求头部 | +| cacheTag | 否 | [CacheTagKey](#CacheTagKey) | | CacheKey中包含自定义字符串 | +| scheme | 否 | [SchemeKey](#SchemeKey) | | CacheKey中包含请求协议 | +| keyRules | 否 | [KeyRule](#KeyRule)[] | | 分路径缓存键配置 | #### QuerystringKey @@ -255,10 +255,10 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :------ | ---- | :----- | :--- | :----------------------------------------------------------- | -| Switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | -| Reorder | 否 | string | | 是否重新排序 | -| Action | 否 | string | | includeAll \| excludeAll \| includeCustom \| excludeAll 使用/排除部分url参数 | -| Value | 否 | string | | 使用/排除的url参数数组,';' 分割 | +| switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | +| reorder | 否 | string | | 是否重新排序 | +| action | 否 | string | | includeAll \| excludeAll \| includeCustom \| excludeAll 使用/排除部分url参数 | +| value | 否 | string | | 使用/排除的url参数数组,';' 分割 | #### CookieKey @@ -266,8 +266,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :---------------------------------------- | -| Switch | 是 | string | | on \| off 是否使用Cookie作为Cache的一部分 | -| Value | 否 | string | | 使用的cookie,';' 分割 | +| switch | 是 | string | | on \| off 是否使用Cookie作为Cache的一部分 | +| value | 否 | string | | 使用的cookie,';' 分割 | #### HeaderKey @@ -275,8 +275,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :--------------------------------- | -| Switch | 否 | string | | 是否组成Cachekey | -| Value | 否 | string | | 组成CacheKey的header数组,';' 分割 | +| switch | 否 | string | | 是否组成Cachekey | +| value | 否 | string | | 组成CacheKey的header数组,';' 分割 | #### CacheTagKey @@ -284,8 +284,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :----------------------------------- | -| Switch | 是 | string | | 是否使用CacheTag作为CacheKey的一部分 | -| Value | 否 | string | | 自定义CacheTag的值 | +| switch | 是 | string | | 是否使用CacheTag作为CacheKey的一部分 | +| value | 否 | string | | 自定义CacheTag的值 | #### SchemeKey @@ -293,7 +293,7 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :-------------------------------------------- | -| Switch | 是 | string | | on \| off 是否使用scheme作为cache key的一部分 | +| switch | 是 | string | | on \| off 是否使用scheme作为cache key的一部分 | #### KeyRule @@ -301,12 +301,12 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------- | ---- | :---------------------------------- | :--- | :----------------------------------------------------------- | -| RulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | -| RuleType | 是 | string | | 规则类型: file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | -| FullUrlCache | 是 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | -| IgnoreCase | 是 | string | | 是否忽略大小写缓存 | -| Querystring | 是 | [RuleQuerystring](#RuleQuerystring) | | CacheKey中包含请求参数 | -| RuleTag | 是 | string | | 路径缓存键标签,传 user | +| rulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| ruleType | 是 | string | | 规则类型: file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| fullUrlCache | 是 | string | | 是否开启全路径缓存 on:开启全路径缓存(即关闭参数忽略) off:关闭全路径缓存(即开启参数忽略) | +| ignoreCase | 是 | string | | 是否忽略大小写缓存 | +| querystring | 是 | [RuleQuerystring](#RuleQuerystring) | | CacheKey中包含请求参数 | +| ruleTag | 是 | string | | 路径缓存键标签,传 user | #### RuleQuerystring @@ -314,9 +314,9 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :-------------------------------------- | -| Switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | -| Action | 是 | string | | includeCustom 包含部分url参数 | -| Value | 是 | string | | 使用/排除的url参数数组,';' 分割 | +| switch | 是 | string | | on \| off CacheKey是否由Querystring组成 | +| action | 是 | string | | includeCustom 包含部分url参数 | +| value | 是 | string | | 使用/排除的url参数数组,';' 分割 | #### Cache @@ -324,8 +324,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :----------------------------------------------------------- | :--- | :------------------- | -| SimpleCache | 否 | [SimpleCache](#SimpleCache) | | 基础缓存过期时间配置 | -| RuleCache | 否 | [RuleCache](#RuleCache)[] | | 高级路径缓存配置 | +| simpleCache | 否 | [SimpleCache](#SimpleCache) | | 基础缓存过期时间配置 | +| ruleCache | 否 | [RuleCache](#RuleCache)[] | | 高级路径缓存配置 | #### SimpleCache @@ -333,12 +333,12 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------------- | ---- | :------------------------------------ | :--- | :----------------------------------------------------------- | -| CacheRules | 是 | [SimpleCacheRule](#SimpleCacheRule)[] | | 缓存过期时间规则 | -| FollowOrigin | 是 | string | | 遵循源站 Cache-Control: max-age 配置 on:开启 off:关闭 | -| IgnoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | -| IgnoreSetCookie | 是 | string | | 忽略源站的Set-Cookie头部 on:开启 off:关闭 | -| CompareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | -| Revalidate | 否 | [Revalidate](#Revalidate) | | 总是回源站校验 | +| cacheRules | 是 | [SimpleCacheRule](#SimpleCacheRule)[] | | 缓存过期时间规则 | +| followOrigin | 是 | string | | 遵循源站 Cache-Control: max-age 配置 on:开启 off:关闭 | +| ignoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | +| ignoreSetCookie | 是 | string | | 忽略源站的Set-Cookie头部 on:开启 off:关闭 | +| compareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | +| revalidate | 否 | [Revalidate](#Revalidate) | | 总是回源站校验 | #### SimpleCacheRule @@ -346,9 +346,9 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :------------ | ---- | :------- | :--- | :----------------------------------------------------------- | -| CacheType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | -| CacheContents | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | -| CacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | +| cacheType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| cacheContents | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| cacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | #### Revalidate @@ -356,8 +356,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :------------------------- | -| Switch | 是 | String | | on \| off 是否总是回源校验 | -| Path | 否 | String | | 只在特定请求路径回源站校验 | +| switch | 是 | String | | on \| off 是否总是回源校验 | +| path | 否 | String | | 只在特定请求路径回源站校验 | #### RuleCache @@ -365,9 +365,9 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :---------------------------------- | :--- | :----------------------------------------------------------- | -| RulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | -| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | -| CacheConfig | 是 | [RuleCacheConfig](#RuleCacheConfig) | | 缓存配置 | +| rulePaths | 是 | string[] | | CacheType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test path 时填充绝对路径,如 /xxx/test.html index 时填充 / | +| ruleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 index:首页 | +| cacheConfig | 是 | [RuleCacheConfig](#RuleCacheConfig) | | 缓存配置 | #### RuleCacheConfig @@ -375,9 +375,9 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------- | ---- | :-------------------------------------------------- | :--- | :----------- | -| Cache | 是 | [CacheConfigCache](#CacheConfigCache) | | 缓存配置 | -| NoCache | 是 | [CacheConfigNoCache](#CacheConfigNoCache) | | 不缓存配置 | -| FollowOrigin | 是 | [CacheConfigFollowOrigin](#CacheConfigFollowOrigin) | | 遵循源站配置 | +| cache | 是 | [CacheConfigCache](#CacheConfigCache) | | 缓存配置 | +| noCache | 是 | [CacheConfigNoCache](#CacheConfigNoCache) | | 不缓存配置 | +| followOrigin | 是 | [CacheConfigFollowOrigin](#CacheConfigFollowOrigin) | | 遵循源站配置 | #### CacheConfigCache @@ -385,11 +385,11 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------------- | ---- | :----- | :--- | :----------------------------------------------------------- | -| Switch | 是 | string | | 缓存配置开关 on:开启 off:关闭 | -| CacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | -| CompareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | -| IgnoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭 默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | -| IgnoreSetCookie | 是 | string | | 当源站返回Set-Cookie头部时,节点是否缓存该头部及body on:开启,不缓存该头部及body off:关闭,遵循用户自定义的节点缓存规则 | +| switch | 是 | string | | 缓存配置开关 on:开启 off:关闭 | +| cacheTime | 是 | number | | 缓存过期时间设置 单位为秒,最大可设置为 365 天 | +| compareMaxAge | 是 | string | | 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存 on:开启 off:关闭 | +| ignoreCacheControl | 是 | string | | 强制缓存 on:开启 off:关闭 默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存 | +| ignoreSetCookie | 是 | string | | 当源站返回Set-Cookie头部时,节点是否缓存该头部及body on:开启,不缓存该头部及body off:关闭,遵循用户自定义的节点缓存规则 | #### CacheConfigNoCache @@ -397,8 +397,8 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :--------- | ---- | :----- | :--- | :-------------------------------- | -| Switch | 是 | string | | 不缓存配置开关 on:开启 off:关闭 | -| Revalidate | 是 | string | | 总是回源站校验 on:开启 off:关闭 | +| switch | 是 | string | | 不缓存配置开关 on:开启 off:关闭 | +| revalidate | 是 | string | | 总是回源站校验 on:开启 off:关闭 | #### CacheConfigFollowOrigin @@ -406,7 +406,7 @@ HSTS 配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----- | ---- | :----- | :--- | :---------------------------------- | -| Switch | 是 | string | | 遵循源站配置开关 on:开启 off:关闭 | +| switch | 是 | string | | 遵循源站配置开关 on:开启 off:关闭 | #### Referer @@ -414,8 +414,8 @@ Referer 黑白名单配置,默认为关闭状态 | 名称 | 必选 | 类型 | 默认 | 描述 | | :----------- | ---- | :---------------------------- | :--- | :------------------------------------------ | -| Switch | 是 | string | | referer 黑白名单配置开关 on:开启 off:关闭 | -| RefererRules | 否 | [RefererRule](#RefererRule)[] | | referer 黑白名单配置规则 | +| switch | 是 | string | | referer 黑白名单配置开关 on:开启 off:关闭 | +| refererRules | 否 | [RefererRule](#RefererRule)[] | | referer 黑白名单配置规则 | #### RefererRule @@ -423,11 +423,11 @@ Referer 黑白名单配置规则,针对特定资源生效 | 名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :------- | :--- | :----------------------------------------------------------- | -| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | -| RulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | -| RefererType | 是 | string | | referer 配置类型 whitelist:白名单 blacklist:黑名单 | -| Referers | 是 | string[] | | referer 内容列表列表 | -| AllowEmpty | 是 | Boolean | | 是否允许空 referer true:允许空 referer false:不允许空 referer | +| ruleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | +| rulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | +| refererType | 是 | string | | referer 配置类型 whitelist:白名单 blacklist:黑名单 | +| referers | 是 | string[] | | referer 内容列表列表 | +| allowEmpty | 是 | Boolean | | 是否允许空 referer true:允许空 referer false:不允许空 referer | #### IpFilter @@ -435,11 +435,11 @@ IP 黑白名单配置,默认为关闭状态 | 名称 | 必选 | 类型 | 默认 | 描述 | | :---------- | ---- | :-------------------------------------- | :--- | :----------------------------------------------------------- | -| Switch | 是 | string | | IP 黑白名单配置开关 on:开启 off:关闭 | -| FilterType | 否 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | -| Filters | 否 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | -| FilterRules | 否 | [IpFilterPathRule](#IpFilterPathRule)[] | | IP 黑白名单分路径配置,白名单功能 | -| ReturnCode | 否 | number | | IP 黑白名单验证失败时返回的 HTTP Code 合法值: 400~499 | +| switch | 是 | string | | IP 黑白名单配置开关 on:开启 off:关闭 | +| filterType | 否 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | +| filters | 否 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | +| filterRules | 否 | [IpFilterPathRule](#IpFilterPathRule)[] | | IP 黑白名单分路径配置,白名单功能 | +| returnCode | 否 | number | | IP 黑白名单验证失败时返回的 HTTP Code 合法值: 400~499 | #### IpFilterPathRule @@ -447,10 +447,10 @@ IP黑白名单分路径配置 | 名称 | 必选 | 类型 | 默认 | 描述 | | :--------- | ---- | :------- | :--- | :----------------------------------------------------------- | -| FilterType | 是 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | -| Filters | 是 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | -| RuleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | -| RulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | +| filterType | 是 | string | | IP 黑白名单类型 whitelist:白名单 blacklist:黑名单 | +| filters | 是 | string[] | | IP 黑白名单列表 支持 X.X.X.X 形式 IP,或 /8、 /16、/24 形式网段 最多可填充 50 个白名单或 50 个黑名单 | +| ruleType | 是 | string | | 规则类型: all:所有文件生效 file:指定文件后缀生效 directory:指定路径生效 path:指定绝对路径生效 | +| rulePaths | 是 | string[] | | RuleType 对应类型下的匹配内容: all 时填充 * file 时填充后缀名,如 jpg、txt directory 时填充路径,如 /xxx/test/ path 时填充绝对路径,如 /xxx/test.html | ### Env From 6fa6d0bc17242f8eaff6153696302bf46e7ad3a7 Mon Sep 17 00:00:00 2001 From: Rong <58057861+Rong5180@users.noreply.github.com> Date: Fri, 18 Mar 2022 10:04:37 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5=20(#46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: rongxwang --- serverless.component.yml | 2 +- src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serverless.component.yml b/serverless.component.yml index 02c9ad8..65ee942 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: website -version: 0.2.4 +version: 0.2.6 author: 'Tencent Cloud, Inc.' org: 'Tencent Cloud, Inc.' description: 静态网站组件,允许用户构建部署静态站点到腾讯 COS。适合用来构建部署静态网站。 diff --git a/src/package.json b/src/package.json index 4ef9d4c..bcc427a 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^2.13.4" + "tencent-component-toolkit": "^2.23.3" } } From e94c53d7517e3cb008282b88fd5ab77398ae8e0b Mon Sep 17 00:00:00 2001 From: slsplus Date: Fri, 18 Mar 2022 02:05:52 +0000 Subject: [PATCH 7/7] chore(release): version 0.2.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [0.2.4](https://github.com/serverless-components/tencent-website/compare/v0.2.3...v0.2.4) (2022-03-18) ### Bug Fixes * 修改文件过多上传失败 ([#46](https://github.com/serverless-components/tencent-website/issues/46)) ([6fa6d0b](https://github.com/serverless-components/tencent-website/commit/6fa6d0bc17242f8eaff6153696302bf46e7ad3a7)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e96c22e..49e1086 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.2.4](https://github.com/serverless-components/tencent-website/compare/v0.2.3...v0.2.4) (2022-03-18) + + +### Bug Fixes + +* 修改文件过多上传失败 ([#46](https://github.com/serverless-components/tencent-website/issues/46)) ([6fa6d0b](https://github.com/serverless-components/tencent-website/commit/6fa6d0bc17242f8eaff6153696302bf46e7ad3a7)) + ## [0.2.2](https://github.com/serverless-components/tencent-website/compare/v0.2.1...v0.2.2) (2021-07-29)