Skip to content

Commit 11b942a

Browse files
committed
update demo
1 parent 3ddc4ed commit 11b942a

File tree

8 files changed

+14
-12
lines changed

8 files changed

+14
-12
lines changed

demo/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport"
66
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8-
<title>cos-js-sdk-v5-demo</title>
8+
<title>cos-js-sdk-v5</title>
99
<style>
1010
body { font-family: "Microsoft YaHei"; }
1111
.page {max-width:1024px;margin:0 auto;}

dist/cos-js-sdk-v5.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -3357,7 +3357,7 @@ function getAuthorizationAsync(params, callback) {
33573357
SecretId: StsData.TmpSecretId,
33583358
SecretKey: StsData.TmpSecretKey,
33593359
Method: params.Method,
3360-
Key: params.Key,
3360+
Key: params.Key || '',
33613361
Query: params.Query,
33623362
Headers: params.Headers
33633363
});
@@ -3381,7 +3381,7 @@ function getAuthorizationAsync(params, callback) {
33813381
Bucket: Bucket,
33823382
Region: Region,
33833383
Method: params.Method,
3384-
Key: params.Key,
3384+
Key: params.Key || '',
33853385
Query: params.Query,
33863386
Headers: params.Headers
33873387
}, function (AuthData) {
@@ -3412,7 +3412,7 @@ function getAuthorizationAsync(params, callback) {
34123412
SecretId: params.SecretId || self.options.SecretId,
34133413
SecretKey: params.SecretKey || self.options.SecretKey,
34143414
Method: params.Method,
3415-
Key: params.Key,
3415+
Key: params.Key || '',
34163416
Query: params.Query,
34173417
Headers: params.Headers
34183418
});
@@ -3513,6 +3513,7 @@ function _submitRequest(params, callback) {
35133513
};
35143514

35153515
// 获取签名
3516+
opt.headers.Uid = '459452372';
35163517
opt.headers.Authorization = params.AuthData.Authorization;
35173518
params.AuthData.Token && (opt.headers['token'] = params.AuthData.Token);
35183519
params.AuthData.ClientIP && (opt.headers['clientIP'] = params.AuthData.ClientIP);

dist/cos-js-sdk-v5.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/sts-auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var request = require('request');
88
var config = {
99
Url: 'https://sts.api.qcloud.com/v2/index.php',
1010
Domain: 'sts.api.qcloud.com',
11-
Proxy: 'http://dev-proxy.oa.com:8080',
11+
Proxy: '',
1212
SecretId: 'AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1313
SecretKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1414
Bucket: 'test-1250000000',

server/sts-auth.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$config = array(
66
'Url' => 'https://sts.api.qcloud.com/v2/index.php',
77
'Domain' => 'sts.api.qcloud.com',
8-
'Proxy' => 'http://dev-proxy.oa.com:8080',
8+
'Proxy' => '',
99
'SecretId' => 'AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1010
'SecretKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1111
'Bucket' => 'test-1250000000',

server/sts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var request = require('request');
88
var config = {
99
Url: 'https://sts.api.qcloud.com/v2/index.php',
1010
Domain: 'sts.api.qcloud.com',
11-
Proxy: 'http://dev-proxy.oa.com:8080',
11+
Proxy: '',
1212
SecretId: 'AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1313
SecretKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1414
Bucket: 'test-1250000000',

server/sts.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$config = array(
66
'Url' => 'https://sts.api.qcloud.com/v2/index.php',
77
'Domain' => 'sts.api.qcloud.com',
8-
'Proxy' => 'http://dev-proxy.oa.com:8080',
8+
'Proxy' => '',
99
'SecretId' => 'AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1010
'SecretKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 固定密钥
1111
'Bucket' => 'test-1250000000',

src/base.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ function getAuthorizationAsync(params, callback) {
17911791
SecretId: StsData.TmpSecretId,
17921792
SecretKey: StsData.TmpSecretKey,
17931793
Method: params.Method,
1794-
Key: params.Key,
1794+
Key: params.Key || '',
17951795
Query: params.Query,
17961796
Headers: params.Headers,
17971797
});
@@ -1813,7 +1813,7 @@ function getAuthorizationAsync(params, callback) {
18131813
Bucket: Bucket,
18141814
Region: Region,
18151815
Method: params.Method,
1816-
Key: params.Key,
1816+
Key: params.Key || '',
18171817
Query: params.Query,
18181818
Headers: params.Headers,
18191819
}, function (AuthData) {
@@ -1845,7 +1845,7 @@ function getAuthorizationAsync(params, callback) {
18451845
SecretId: params.SecretId || self.options.SecretId,
18461846
SecretKey: params.SecretKey || self.options.SecretKey,
18471847
Method: params.Method,
1848-
Key: params.Key,
1848+
Key: params.Key || '',
18491849
Query: params.Query,
18501850
Headers: params.Headers,
18511851
});
@@ -1954,6 +1954,7 @@ function _submitRequest(params, callback) {
19541954
};
19551955

19561956
// 获取签名
1957+
opt.headers.Uid = '459452372';
19571958
opt.headers.Authorization = params.AuthData.Authorization;
19581959
params.AuthData.Token && (opt.headers['token'] = params.AuthData.Token);
19591960
params.AuthData.ClientIP && (opt.headers['clientIP'] = params.AuthData.ClientIP);

0 commit comments

Comments
 (0)