From 70ddb7e0c111828e1d03b2b38eaf63067f27b3b7 Mon Sep 17 00:00:00 2001 From: tickstep Date: Tue, 27 Dec 2022 10:06:19 +0800 Subject: [PATCH] expland expired time to fix url expired issue #214 #207 #208 --- internal/functions/panupload/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/functions/panupload/utils.go b/internal/functions/panupload/utils.go index f51e9d1..4116d51 100644 --- a/internal/functions/panupload/utils.go +++ b/internal/functions/panupload/utils.go @@ -55,7 +55,7 @@ func IsUrlExpired(urlStr string) bool { } expiredTimeSecStr := u.Query().Get("x-oss-expires") expiredTimeSec, _ := strconv.ParseInt(expiredTimeSecStr, 10, 64) - if (expiredTimeSec - time.Now().Unix()) <= 10 { // 小于10秒 + if (expiredTimeSec - time.Now().Unix()) <= 300 { // 小于5分钟 // expired return true }