Skip to content

Commit 2a061ed

Browse files
committed
fix: cors config
1 parent 1d225b8 commit 2a061ed

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docs/configure.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ inputs:
3333
grantWrite: id="1234567"
3434
grantFullControl: id="1234567"
3535
cors:
36-
- id: abc
37-
maxAgeSeconds: '10'
36+
- maxAgeSeconds: 0
3837
allowedMethods:
3938
- GET
4039
allowedOrigins:
41-
- https://tencent.com
40+
- '*'
4241
allowedHeaders:
43-
- FIRST_ALLOWED_HEADER
42+
- '*'
4443
exposeHeaders:
45-
- FIRST_EXPOSED_HEADER
44+
- ''
4645
tags:
4746
- key: abc
4847
value: xyz

serverless.component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cos
2-
version: 0.2.2
2+
version: 0.2.3
33
author: 'Tencent Cloud, Inc.'
44
org: 'Tencent Cloud, Inc.'
55
description: Deploy Tencent COS.

src/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ async function formatInputs(instance, inputs) {
3333
}
3434
}
3535

36+
if (inputs.cors) {
37+
formatedInputs.cors = inputs.cors
38+
}
39+
3640
if (inputs.website === true) {
3741
const websiteConfig = inputs.websiteConfig || {}
3842
formatedInputs.ignoreHtmlExt = websiteConfig.ignoreHtmlExt

0 commit comments

Comments
 (0)