Closed CJ-cooper6 closed 2 months ago
Noticed the same thing today. The S3 client should support path-style URLs if we'd want to use MinIO.
我发现,minio的endpoin,只能填写ip+端口,不能填写https的域名,这很不方便。
Issue is not in English. It has been translated automatically.
I found that minio's endpoint can only fill in the ip + port, but cannot fill in the https domain name, which is very inconvenient.
I don't know what to say. Minio must use vhost mode to connect to Memos, and configuring vhost mode is very troublesome. It requires bucket domain name resolution to the device and also needs Nginx to proxy traffic. Minio's own vhost must use a certificate that includes subdomains for access, which is too complicated and lacks the convenience of path style mode. I submitted a suggestion two weeks ago, proposing the addition of absolute path access, but they are not planning to implement such a simple feature; today they closed the issue citing no plans in this regard. If I knew Go, I might have written it myself, but unfortunately, I don’t. If there’s anything that can serve as an alternative, I hope you can recommend it to me.
@duckgun13476 其实不会go也能搞,就是在一个文件里加一行内容,然后自己编译镜像就行了,我之前发在issues里,然后有人试过了没问题
修改plugin/storage/s3/s3.go
的内容
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
o.BaseEndpoint = aws.String(s3Config. Endpoint)
o.UsePathStyle=true //Setting to true means using Path Style
})
Issue is not in English. It has been translated automatically.
@duckgun13476 In fact, you can do it even if you don’t know Go. You just need to add a line of content to a file and compile the image yourself. I posted it in issues before, and someone tried it and it worked fine.
Modify the contents of plugin/storage/s3/s3.go
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
o.BaseEndpoint = aws.String(s3Config.Endpoint)
o.UsePathStyle=true //Setting to true means using Path Style
})
@pipuwong 我们都是用的域名去访问的,就是目前memos不支持path-style的minio,以前是支持的,哎
Issue is not in English. It has been translated automatically.
@pipuwong We all use the domain name to access, but currently memos does not support path-style minio. It used to support it, hehe.
FYI: Minio support both vhost and path style, memos is ok, you simply should activate vhost support of minio by setting the MINIO_DOMAIN environment:
export MINIO_DOMAIN=mydomain.com
minio server /data
FYI: Minio support both vhost and path style, memos is ok, you simply should activate vhost support of minio by setting the MINIO_DOMAIN environment:
export MINIO_DOMAIN=mydomain.com minio server /data
So why not default to path style or choose which mode to use @buyiyihu
No idea, you may ask the maintainer
No idea, you may ask the maintainer
Sorry, I wasn't targeting you earlier. Sorry
Describe the bug
Using minio as the database,specify the correct URL but "memos." is automatically added before the url.
Steps to reproduce
The version of Memos you're using.
v0.22.4
Screenshots or additional context
No response