github.com/Kutear/qiniu-token-gen


Properties

Last built 1 month ago using go version go1.7.5 linux/amd64 and 94 seconds of time

Downloads
Filename
File Size
 
qiniu-token-gen_master_darwin-386.zip
1.9MiB
qiniu-token-gen_master_darwin-amd64.zip
2.0MiB
qiniu-token-gen_master_linux-386.zip
1.9MiB
qiniu-token-gen_master_linux-amd64.zip
2.0MiB
qiniu-token-gen_master_linux-arm.zip
1.8MiB
qiniu-token-gen_master_windows-386.zip
1.8MiB
qiniu-token-gen_master_windows-amd64.zip
2.0MiB
Project-Readme for this version

qiniu-token-gen

七牛服务端Token生成

Usage

# /uploadToken 上传Token生成
POST /uploadToken HTTP/1.1
Host: 127.0.0.1:8080
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: 99ec3e07-70e5-4c14-47b1-a213bc86d787

key={your_key}&ak={your_ak}&sk={your_sk}&bucket={your_bucket}

由于同源策略限制,启用中间代理,详情看七牛开发文档,代理时在Header中添加字段requestUrl,其值为真实请求地址。其余请求头/请求Body与七牛官方一致。

# /proxy  代理七牛服务 || 其实可以代理所有的网络请求(对应的URL)
POST(或GET) /proxy HTTP/1.1
Host: 127.0.0.1:8080
Content-Type: application/x-www-form-urlencoded
Authorization: {Token}
requestUrl: http://rsf.qbox.me/list?bucket=kutear&marker=&limit=1000&delimiter=/&prefix=2017/
Cache-Control: no-cache
Postman-Token: 5d70f450-859c-e4fb-87b1-899ec7bedca1

Download

gobuilder