Skip to content

Commit

Permalink
bug: fix 403 error
Browse files Browse the repository at this point in the history
  • Loading branch information
haochuan9421 committed Oct 31, 2018
1 parent 4529e5c commit 9a58aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/sts-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ var getTempKeys = function (callback) {
Action: Action,
durationSeconds: 7200,
name: 'cos',
policy: encodeURIComponent(policyStr),
policy: encodeURIComponent(policyStr).replace(/\*/g,'%2A'),
};
params.Signature = util.getSignature(params, config.SecretKey, Method);

Expand Down Expand Up @@ -198,7 +198,7 @@ app.all('/sts-auth', function (req, res, next) {
SecretKey: tempKeys.credentials.tmpSecretKey,
Method: req.body.method || req.query.method,
Key: Key,
Query: req.body.query || req.query.method || {},
Query: req.body.query || req.query.query || {},
Headers: req.body.headers || req.query.headers || {},
};
data = {
Expand Down

0 comments on commit 9a58aa1

Please sign in to comment.