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

api.GeneratePresignedUrl方法setUri的问题 #36

Open
zj703063545 opened this issue Jan 6, 2020 · 1 comment
Open

api.GeneratePresignedUrl方法setUri的问题 #36

zj703063545 opened this issue Jan 6, 2020 · 1 comment

Comments

@zj703063545
Copy link

if len(bucket) != 0 && net.ParseIP(domain) == nil { // not use an IP as the endpoint by client
req.SetUri(bce.URI_PREFIX + object)
req.SetHost(bucket + "." + req.Host())
} else {
req.SetUri(getObjectUri(bucket, object))
}
此处逻辑在配置了bucket和endpoint之后,setHost会在endpoint之前再加上bucket,导致无法访问

@duanliguo
Copy link
Contributor

这里SetHost不能用bucket.bj.bcebos.com,只能使用bj.bcebos.com

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