Way to map GCP surrogate headers to fastly?

thanks for the tips!

I noticed another thread where someone claimed setting these headers in vcl_fetch had no effect, which seems to match what we’re seeing.

The x-goog-meta-* headers are present in the response, and the formats seem to match:

< HTTP/2 200
< cache-control: no-cache, no-store, must-revalidate
< expires: Thu, 31 Oct 2024 19:47:27 GMT
< last-modified: Tue, 31 Oct 2023 20:08:52 GMT
< x-goog-meta-surrogate-control: max-age=31536000
< x-goog-meta-surrogate-key: juno
< content-type: application/javascript
< accept-ranges: bytes
< date: Wed, 01 Nov 2023 19:47:27 GMT
< via: 1.1 varnish
< x-served-by: cache-yyc1430029-YYC
< x-cache-hits: 0
< vary: Accept-Encoding
< content-length: 16090

We are setting the host specifically in the VCL as well as using the backend definition

in vcl_recv:

set req.backend = F_google_cloud_storage;
set req.http.host = "storage.googleapis.com";

our backend def:

backend F_google_cloud_storage {
  .connect_timeout = 1s;
  .dynamic = true;
  .port = "443";
  .host = "storage.googleapis.com";
  .first_byte_timeout = 15s;
  .max_connections = 200;
  .between_bytes_timeout = 10s;
  .share_key = "REDACTED";

  .probe = {
    .request = "HEAD /unii-frontend/ping HTTP/1.1" "Host: storage.googleapis.com" "Connection: close";
    .window = 5;
    .threshold = 1;
    .timeout = 2s;
    .initial = 5;
    .dummy = true;
  }
}

I’ll see what I can recreate locally with a log statement