minio / minio-go

MinIO Go client SDK for S3 compatible object storage
https://docs.min.io/docs/golang-client-quickstart-guide.html
Apache License 2.0
2.45k stars 632 forks source link

GCP endpoint validation error #1974

Closed ammarhusain-sol closed 2 months ago

ammarhusain-sol commented 3 months ago

While working with GCP if the provided endpoint has a port number for example ("storage.googpleapis.com:443") then the endpoint validation using the function IsGoogleEndpoint() fails and throws an error "Google Cloud Storage endpoint should be 'storage.googleapis.com'"

In the function IsGoogleEndPoint() there is exact hostname matching happens but in the GO-URL package in the struct URL host contains both hostname and port this causes the error if the provided endpoint has a port.

ammarhusain-sol commented 2 months ago

This issue is resolved in this PR