Skip to content

Commit 08306b0

Browse files
author
dfounderliu
committed
fix cos
1 parent afcd931 commit 08306b0

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/baas/cos/index.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const {cos} = require('tencent-cloud-sdk')
2-
const cdn = require('../cdn/index')
32
const util = require('util')
43
const path = require('path')
54
const fs = require('fs')
@@ -424,22 +423,7 @@ class CosUtils {
424423
}
425424
await this.upload(uploadDict)
426425

427-
// add user domain
428-
if (inputs.hosts && inputs.hosts.length > 0) {
429-
const cosOriginAdd = `${inputs.bucket}.cos-website.${this.region}.myqcloud.com`
430-
for (let i = 0; i < inputs.hosts.length; i++) {
431-
const cdnInputs = inputs.hosts[i]
432-
cdnInputs.hostType = 'cos'
433-
cdnInputs.serviceType = 'web'
434-
cdnInputs.fwdHost = cosOriginAdd
435-
cdnInputs.origin = cosOriginAdd
436-
}
437-
const cdn = new Cdn(this.credentials, this.region)
438-
const outputs = await cdn.deploy(inputs)
439-
inputs.cndOutput = outputs
440-
}
441-
442-
return inputs
426+
return `${inputs.bucket}.cos-website.${this.region}.myqcloud.com`
443427
}
444428

445429
async deploy(inputs = {}) {

0 commit comments

Comments
 (0)