mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
fix: lambda function expiration when cred.Expiration is set (#17029)
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user