mirror of
https://gitee.com/zhangsken/aliyunpan.git
synced 2026-10-16 10:29:42 +08:00
fix URL expired issue #208
This commit is contained in:
@@ -55,7 +55,7 @@ func IsUrlExpired(urlStr string) bool {
|
||||
}
|
||||
expiredTimeSecStr := u.Query().Get("x-oss-expires")
|
||||
expiredTimeSec, _ := strconv.ParseInt(expiredTimeSecStr, 10, 64)
|
||||
if (time.Now().Unix() - 10) >= expiredTimeSec {
|
||||
if (expiredTimeSec - time.Now().Unix()) <= 10 { // 小于10秒
|
||||
// expired
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user