メインブログを CloudflareからAWS S3に移行した際に、S3のBlock pubic accessをオフ、Static website hostingをオンにしていたので、CloudFrontがS3のREST APIエンドポイントを使用するよう修正しました。この場合CloudFrontはサブディレクトリのindex.htmlファイルを自動的に解決することができないので、以下のURLのパスを適切に変換するCloudFront Functionsを追加しました。あるあるですね。

function handler(event) {

var request = event.request;

... blog.yostos.org https://blog.yostos.org/2024/11/05/cloudflareaws-ssblock-pubic.html

Reply to this note

Please Login to reply.

Discussion

No replies yet.