Skip to content

Commit

Permalink
fix: add cosOrigin output
Browse files Browse the repository at this point in the history
  • Loading branch information
yugasun committed Jun 22, 2020
1 parent c9f072a commit eb61efb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class ServerlessComopnent extends Component {

const outputs = {
region: region,
bucket: inputs.bucket
bucket: inputs.bucket,
cosOrigin: `${inputs.bucket}.cos.${region}.myqcloud.com`
}
if (inputs.website === true) {
inputs.code = {
Expand All @@ -99,6 +100,7 @@ class ServerlessComopnent extends Component {
}
const websiteUrl = await cos.website(inputs)
outputs.website = `${this.getDefaultProtocol(inputs.protocol)}://${websiteUrl}`
outputs.websiteOrigin = websiteUrl
} else {
try {
// check website, if enable, disable it
Expand Down

0 comments on commit eb61efb

Please sign in to comment.