From eb61efbabe9ab1321782e61607689ecca3b648da Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 22 Jun 2020 17:50:51 +0800 Subject: [PATCH] fix: add cosOrigin output --- src/serverless.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/serverless.js b/src/serverless.js index 492cace..13cc558 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -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 = { @@ -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