code: func (lh *cloudFrontStorageMiddleware) URLFor(ctx context.Context, path string, options map[string]interface{}) (string, error) {
  	// TODO(endophage): currently only supports S3
  	keyer, ok := lh.StorageDriver.(S3BucketKeyer)
  	if !ok {
  		dcontext.GetLogger(ctx).Warn("the CloudFront middleware does not support this backend storage driver")
  		return lh.StorageDriver.URLFor(ctx, path, options)
  	}
  
  	if eligibleForS3(ctx, lh.awsIPs) {
  		return lh.StorageDriver.URLFor(ctx, path, options)
  	}
  
  	// Get signed cloudfront url.
  	cfURL, err := lh.urlSigner.Sign(lh.baseURL+keyer.S3BucketKey(path), time.Now().Add(lh.duration))
  	if err != nil {
  		return "", err
  	}
  	return cfURL, nil
  }
docs: // URLFor attempts to find a url which may be used to retrieve the file at the given path.
  // Returns an error if the file cannot be found.