mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-02 21:27:15 +08:00
parent
0acd6a43d6
commit
70ddb7e0c1
@ -55,7 +55,7 @@ func IsUrlExpired(urlStr string) bool {
|
|||||||
}
|
}
|
||||||
expiredTimeSecStr := u.Query().Get("x-oss-expires")
|
expiredTimeSecStr := u.Query().Get("x-oss-expires")
|
||||||
expiredTimeSec, _ := strconv.ParseInt(expiredTimeSecStr, 10, 64)
|
expiredTimeSec, _ := strconv.ParseInt(expiredTimeSecStr, 10, 64)
|
||||||
if (expiredTimeSec - time.Now().Unix()) <= 10 { // 小于10秒
|
if (expiredTimeSec - time.Now().Unix()) <= 300 { // 小于5分钟
|
||||||
// expired
|
// expired
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user