Skip to content

Commit

Permalink
修改签名
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Aug 23, 2017
1 parent 0237c01 commit de48541
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions server/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ var cos = {
sid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
skey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
getAuthorization: function (method, pathname, callback) {
method = method ? method : 'POST';
method = method.toUpperCase();
method = (method ? method : 'post').toLowerCase();
pathname = pathname ? pathname : '/';
pathname.substr(0, 1) != '/' && (pathname = '/' + pathname);
var queryParams = {};
var headers = {};

console.log(method, pathname);

// 工具方法
var getObjectKeys = function (obj) {
var list = [];
Expand Down
3 changes: 1 addition & 2 deletions server/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

function getAuthorization($method, $pathname)
{
$method = strtoupper($method);
$method = $method ? $method : 'POST';
$method = strtolower($method ? $method : 'post');
$pathname = $pathname ? $pathname : '/';
substr($pathname, 0, 1) != '/' && ($pathname = '/' . $pathname);
$queryParams = array();
Expand Down

0 comments on commit de48541

Please sign in to comment.