CloudFront签名的URL的最大到期时间是多少 [英] What is the maximum expiration time for CloudFront signed url
问题描述
我正在使用CloudFront从此 doc CloudFront签名URL的最长到期时间是多少?我该如何在DateLessThan参数上提及
I'm using CloudFront for generating signed URL from this doc what is the maximum expiration time for CloudFront signed URL? How should I mention on this DateLessThan argument
示例代码段
String signedUrlCanned = CloudFrontService.signUrlCanned(
"http://" + distributionDomain + "/" + s3ObjectKey, // Resource URL or Path
keyPairId, // Certificate identifier,
// an active trusted signer for the distribution
derPrivateKey, // DER Private key data
ServiceUtils.parseIso8601Date("2011-11-14T22:20:00.000Z") // DateLessThan
);
System.out.println(signedUrlCanned);
注意:它应该是永久网址,例如Instagram cdn URL
Note: It should be a permanent URL like Instagram cdn URL
推荐答案
CloudFront签名的URL没有最长到期时间,但是您始终必须指定 DateLessThan
参数。
There is no maximum expiration time for CloudFront signed URLs but you always have to specify the DateLessThan
parameter.
CloudFront要求使用此值,以防止用户永久访问您的私人内容。
CloudFront requires this value to prevent users from having permanent access to your private content.
一个类似永久性的网址,您应该在以后设置 DateLessThan
。
In order to have a permanent-like URL you should set the DateLessThan
far in the future.
另请参见 CloudFront何时检查到期日期和使用自定义策略创建签名的URL
这篇关于CloudFront签名的URL的最大到期时间是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!