Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new option customEndpointHost #1358

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peerless-hero
Copy link

Some cloud storage providers support custom domain names, but the existing configuration automatically appends the bucket name, causing service access issues.

For instance, the intended access should be to oss.example.com, but it instead becomes bucket.oss.example.com, resulting in the service being unreachable.

To address this situation, this Pull Request (PR) introduces the customEndpointHost configuration. When enabled, it uses the endpoint as the final request hostname without processing additional strings, allowing the aforementioned example to function correctly.

@prakashsvmx
Copy link
Member

@peerless-hero - thank you .
Please Note:

We comply with AWS S3 both path style and DNS Style.

Which provider is this ? Please elaborate with details and also please add functional tests if it is compatible with AWS S3.

@peerless-hero
Copy link
Author

peerless-hero commented Nov 16, 2024

@peerless-hero - thank you . Please Note:

We comply with AWS S3 both path style and DNS Style.

Which provider is this ? Please elaborate with details and also please add functional tests if it is compatible with AWS S3.

I am using Alibaba Cloud's OSS storage, which features a domain name style of <bucketName>.oss-<regionId>.aliyuncs.com. Additionally, it provides S3-compatible APIs, allowing me to use the minio SDK seamlessly.

When initializing with the minio SDK, setting the endpoint to oss-<regionId>.aliyuncs.com enables normal usage.

Due to business requirements, I now need to bind a personalized domain name, such as oss.mydomain.com. According to their documentation, the binding method involves adding a CNAME record for mydomain.com and pointing it to <bucketName>.oss-<regionId>.aliyuncs.com .

At this point, if I set the endpoint to oss.mydomain.com and attempt to concatenate <bucketName> to form <bucketName>.oss.mydomain.com, it is not functional.

Many cloud providers offer documentation on binding custom domain names. For reference, here are some links:
AlibabaCloud: https://www.alibabacloud.com/help/en/oss/user-guide/map-custom-domain-names-5
Amazon: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs
TencentCloud: https://www.tencentcloud.com/document/product/436/31507

Binding custom domain names is not an uncommon scenario, so I hope this PR can make the minio SDK more flexible in supporting custom domain names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants