mirror of
https://github.com/minio/minio
synced 2024-09-06 00:37:25 +00:00
fix: lambda function expiration when cred.Expiration is set (#17029)
This commit is contained in:
parent
62151a751d
commit
958a480e53
|
@ -46,8 +46,9 @@ func getLambdaEventData(bucket, object string, cred auth.Credentials, r *http.Re
|
|||
secure = globalMinioEndpointURL.Scheme == "https"
|
||||
}
|
||||
|
||||
duration := time.Since(cred.Expiration)
|
||||
if cred.Expiration.IsZero() {
|
||||
duration := time.Until(cred.Expiration)
|
||||
if cred.Expiration.IsZero() || duration > time.Hour {
|
||||
// Always limit to 1 hour.
|
||||
duration = time.Hour
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue