mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05: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"
|
secure = globalMinioEndpointURL.Scheme == "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
duration := time.Since(cred.Expiration)
|
duration := time.Until(cred.Expiration)
|
||||||
if cred.Expiration.IsZero() {
|
if cred.Expiration.IsZero() || duration > time.Hour {
|
||||||
|
// Always limit to 1 hour.
|
||||||
duration = time.Hour
|
duration = time.Hour
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user