Skip to content

Commit

Permalink
优化 csp demo
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Nov 22, 2018
1 parent 15e56b5 commit 6422c6a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions csp/csp.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,6 @@ <h1>cos-js-sdk-v5</h1>
},
};

function getAuth() {
var key = '1.png';
cos.options.getAuthorization({
Method: 'get',
Key: key
}, function (auth) {
// 注意:这里的 Bucket 格式是 test-1250000000
logger.log('http://' + config.Bucket + '.cos.' + config.Region + '.myqcloud.com' + '/' + encodeURIComponent(key).replace(/%2F/g, '/') + '?sign=' + encodeURIComponent(auth));
});
}

function getObjectUrl() {
var url = cos.getObjectUrl({
Bucket: config.Bucket, // Bucket 格式:test-1250000000
Expand Down

0 comments on commit 6422c6a

Please sign in to comment.