Specifiying an ipv6 address as an endpoint with a non-default port in the MinioClient constructor, similar to the snippet seen below, will result in an S3Error: Invalid Request (address 2606:4700::6810:1922:9000: too many colons in address) Error every time the Object Storage is accessed (e.g. when trying to upload a file).
Which is not taking into account that an ipv6 address should be enclosed in square brackets and sets the host-header to 2606:4700::6810:1922:9000, probably leading to the port being read as part of the ipv6 address later, resulting in a rejection of the request.
Enclosing the endpoint in the Client constructor with square brackets will throw an InvalidEndpointError.
Specifiying an ipv6 address as an endpoint with a non-default port in the MinioClient constructor, similar to the snippet seen below, will result in an
S3Error: Invalid Request (address 2606:4700::6810:1922:9000: too many colons in address)
Error every time the Object Storage is accessed (e.g. when trying to upload a file).It seems like the problem is caused by this line: https://github.com/minio/minio-js/blob/796d0d6e57475edbd4a1c18c8bf314c1e285311f/src/internal/client.ts#L420
Which is not taking into account that an ipv6 address should be enclosed in square brackets and sets the host-header to
2606:4700::6810:1922:9000
, probably leading to the port being read as part of the ipv6 address later, resulting in a rejection of the request. Enclosing the endpoint in the Client constructor with square brackets will throw anInvalidEndpointError
.I would expect ipv6 addresses in the host header to be handled in a similar way as it is done by nodejs internally (when no host-header is specified): (https://github.com/nodejs/node/blob/59ebf6d397c9c468e5beb75b9ed8c82ab0603e3b/lib/_http_client.js#L290-L307)
We worked around this problem by having a domain point to our ipv6-only cloud server and using that for the endpoint option.