code: func eligibleForS3(ctx context.Context, awsIPs *awsIPs) bool {
  	if awsIPs != nil && awsIPs.initialized {
  		if addr, err := parseIPFromRequest(ctx); err == nil {
  			request, err := dcontext.GetRequest(ctx)
  			if err != nil {
  				dcontext.GetLogger(ctx).Warnf("the CloudFront middleware cannot parse the request: %s", err)
  			} else {
  				loggerField := map[interface{}]interface{}{
  					"user-client": request.UserAgent(),
  					"ip":          dcontext.RemoteIP(request),
  				}
  				if awsIPs.contains(addr) {
  					dcontext.GetLoggerWithFields(ctx, loggerField).Info("request from the allowed AWS region, skipping CloudFront")
  					return true
  				}
  				dcontext.GetLoggerWithFields(ctx, loggerField).Warn("request not from the allowed AWS region, fallback to CloudFront")
  			}
  		} else {
  			dcontext.GetLogger(ctx).WithError(err).Warn("failed to parse ip address from context, fallback to CloudFront")
  		}
  	}
  	return false
  }
docs: // eligibleForS3 checks if a request is eligible for using S3 directly
  // Return true only when the IP belongs to a specific aws region and user-agent is docker