CloudFront 签名的最长到期时间是多少 url
What is the maximum expiration time for CloudFront signed url
我正在使用 CloudFront 从这个 doc 生成签名 URL CloudFront 签名 URL 的最长到期时间是多少?我应该如何提及这个 DateLessThan 参数
示例代码片段
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);
注意:应该是永久的URL像Instagram cdnURL
CloudFront 签名的 URL 没有最长过期时间,但您始终必须指定 DateLessThan
参数。
CloudFront 需要此值以防止用户永久访问您的私有内容。
为了拥有类似永久的 URL,您应该将 DateLessThan
设置在遥远的未来。
另见 When Does CloudFront Check the Expiration Date and Time in a Signed URL? and Creating a Signed URL Using a Custom Policy
我正在使用 CloudFront 从这个 doc 生成签名 URL CloudFront 签名 URL 的最长到期时间是多少?我应该如何提及这个 DateLessThan 参数
示例代码片段
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);
注意:应该是永久的URL像Instagram cdnURL
CloudFront 签名的 URL 没有最长过期时间,但您始终必须指定 DateLessThan
参数。
CloudFront 需要此值以防止用户永久访问您的私有内容。
为了拥有类似永久的 URL,您应该将 DateLessThan
设置在遥远的未来。
另见 When Does CloudFront Check the Expiration Date and Time in a Signed URL? and Creating a Signed URL Using a Custom Policy