UPDATE
一些細節:AWS Cloudfront控制檯中的「Origin Protocol Policy」字段在哪裏?
的的Cloudfront分佈採用了S3的靜態網站託管端點它看起來像:bucket.name.s3-website-us-east-1.amazonaws.com
。
這重定向到實際的網站。
Origin Protocol Policy (Amazon EC2, Elastic Load Balancing, and Other Custom Origins Only)
The protocol policy that you want CloudFront to use when fetching objects from your origin server.
Important
If your Amazon S3 bucket is configured as a website endpoint, you must specify HTTP Only. Amazon S3 doesn't support HTTPS connections in that configuration.
看來你只能有HTTP Only
。那是對的嗎?有沒有要求指定HTTPS Only
或Match Viewer
?
我在問,因爲我見過的博客似乎表明Match Viewer
是可能的。例如。
https://simonecarletti.com/blog/2016/08/redirect-domain-https-amazon-cloudfront/
https://karelledru.com/2016/06/static-site-hosting-on-S3-and-CloudFront/
The value of the Origin Protocol Policy field in the CloudFront console or,
if you're using the CloudFront API, the OriginProtocolPolicy element in the
DistributionConfig complex type. In the CloudFront console, the options are
HTTP Only, HTTPS Only, and Match Viewer.
,但我沒有看到在控制檯的Origin Protocol Policy
場。
本指南https://simonecarletti.com/blog/2016/08/redirect-domain-https-amazon-cloudfront/將匹配查看器顯示爲S3來源的選項。 – Snowcrash
謝謝。更新。 –
因此,似乎無法爲使用「S3靜態網站託管端點」的CloudFront分配提供HTTPS Only或Match Viewer,即使它是「自定義來源」......? – Snowcrash