Sha256: e476e9d6a26cdd5f1ee5d3acdd6105457331463ff0df16f9a4373ab942b0900d
Contents?: true
Size: 603 Bytes
Versions: 16
Compression:
Stored size: 603 Bytes
Contents
package customizations import ( "github.com/aws/smithy-go/transport/http" "strings" ) func updateS3HostForS3AccessPoint(req *http.Request) { updateHostPrefix(req, "s3", s3AccessPoint) } func updateS3HostForS3ObjectLambda(req *http.Request) { updateHostPrefix(req, "s3", s3ObjectLambda) } func updateHostPrefix(req *http.Request, oldEndpointPrefix, newEndpointPrefix string) { host := req.URL.Host if strings.HasPrefix(host, oldEndpointPrefix) { // For example if oldEndpointPrefix=s3 would replace to newEndpointPrefix req.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):] } }
Version data entries
16 entries across 16 versions & 1 rubygems