declare local var.bucketName STRING;
set var.bucketName = "betts-gcp-gcs-fastly-tutorial";

if (req.restarts == 0) {
  set req.http.orig-req-url = req.url;
  set req.url = "/" + var.bucketName + req.url;
}

if (req.http.retry-for-dir) {
  set req.url = req.url + "/";
}

# Fetch the index page if the request is for a directory
if (req.url ~ "\/$") {
  set req.url = req.url + "index.html";
}