gpt4 book ai didi

amazon-web-services - Heroku SSL Cloudfront 缺少 key 对 ID 403 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:44:12 32 4
gpt4 key购买 nike

我正在尝试通过云前端在 Heroku 上托管的 Rails 4.2 应用程序上提供所有 Assets 。在使用具有 somename.herokuapp.com 的 heroku 应用程序之前,我已经成功地使用了 cloudfront,但是这个应用程序具有自定义域和通配符 SSL。我无法获取任何 Assets 来提供服务,它们都有 403

我已尝试在 AWS 上上传我的 SSL 并且还尝试使用默认 CloudFront 证书 (*.cloudfront.net)(适用于我的非自定义域应用程序)。

我已确保我的 SSL 在 AWS 上 AWS 想要的区域(弗吉尼亚北部)。

我已确定我只使用 HTTP/1.1、HTTP/1.0。

我已确保我的分发已“启用”。

我的 SSL 是一个通配符,所以它看起来像这样 '*.mydomain.com'

当我将它上传到 AWS 并将其添加到我的分配中时,我看到它正在使用中。

我已确保我的 aws_id/aws_key 有效。然而,有某种 Cloudfront key /对,但我不知道我应该把它放在我网站的什么地方,我只有 aws_id/aws_secret_key 的 ENV 变量。

Request URL:https://mycloudfrontdistn.cloudfront.net/assets/subfolder/secondfolder/gift-52db27eb2ced10800db38fbd74ec2ef40704d8c55d49b2654f7fe014e4bd1eff.png
Request Method:GET
Status Code:403 Forbidden
Remote Address:REDACTED (I don't know if this is sensitive)
Response Headers
view source
Connection:keep-alive
Content-Length:146
Content-Type:text/xml
Date:Fri, 04 Nov 2016 23:06:47 GMT
Server:CloudFront
Via:1.1 somebignumber.cloudfront.net (CloudFront)
X-Amz-Cf-Id:myAmazonKey==
X-Cache:Error from cloudfront

Request Headers
view source
Accept:image/webp,image/*,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:mycloudfrontdist.cloudfront.net
Referer:https: https//www.mysite.com
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

最佳答案

如果您启用 Restrict Viewer Access,则会发生此错误关于分发的缓存行为,但您实际上并未使用 CloudFront 签名 URL,因为内容是公开的。

If you want requests for objects that match the PathPattern for this cache behavior to use public URLs, choose No.

关于amazon-web-services - Heroku SSL Cloudfront 缺少 key 对 ID 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40433096/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com