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

使用自有域名获取私有bucket对象时, 如何能返回自有域名的地址? #14

Open
luckywb13 opened this issue Jan 12, 2022 · 1 comment

Comments

@luckywb13
Copy link

在调用ObsClient.CreateSignedUrl这个方法的时候如何能返回obs已经绑定的域名, 而不是obs的自有域名。

比如:
现在返回的是:https://xxx.obs.cn-north-4.myhuaweicloud.com/test.png?xxx=xxx&Expires=1642006073&Signature=xxx
理想的返回的结果应该是 :https://img.xxx.com/test.png?xxx=xxx&Expires=1642006073&Signature=xxx

@noaccident
Copy link
Collaborator

该功能是支持的。

  1. 初始化时,endpoint指定为自定义域名,并开启cname
obsClient, err := obs.New(ak, sk, "img.xxx.com", obs.WithCustomDomainName(true))
  1. 正常调用CreateSignedUrl即可

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

No branches or pull requests

2 participants