VCLスニペットに以下の(1)(2)の設定を追加します。
【】の中身はお客様の環境に合わせて下さい。
(1)VCLスニペット1つ目
配置場所:最上部
backend F_Google_Cloud_Storage {
.between_bytes_timeout = 10s;
.connect_timeout = 1s;
.dynamic = true;
.first_byte_timeout = 15s;
.host = ""storage.googleapis.com"";
.max_connections = 200;
.port = ""443"";
.share_key = ""【サービスの基本設定にあるID】"";
.ssl = true;
.ssl_cert_hostname = ""【bucket name】.storage.googleapis.com"";
.ssl_check_cert = always;
.ssl_sni_hostname = ""【bucket name】.storage.googleapis.com"";
.probe = {
.dummy = true;
.initial = 5;
.request = ""HEAD / HTTP/1.1"" ""Host: 【bucket name】.storage.googleapis.com"" ""Connection: close""; ※1行で入力します
.threshold = 1;
.timeout = 2s;
.window = 5;
}
}
(2)VCLスニペット2つ目
配置場所:指定(recv)
set req.http.Fastly-Orig-Host = req.http.host;
set req.http.host = ""【bucket name】.storage.googleapis.com"";
set req.backend = F_Google_Cloud_Storage;
set req.http.Date = now;
set req.http.Authorization = ""AWS 【相互運用アクセスキー】:"" digest.hmac_sha1_base64(""【相互運用シークレットキー】"", if(req.method == ""HEAD"", ""GET"", req.method) LF LF LF req.http.Date LF ""/【bucket name】"" req.url.path); ※1行で入力します
※VLCスニペット2つ目の5行目ですが、AWS[半角スペース]【相互運用アクセスキー】となっていますので、注意してください。