fix when prefix has '/' and prefix is not end with '/' (#684)

This commit is contained in:
yanjingtu 2023-08-30 12:09:10 +08:00 committed by GitHub
parent e0c2099e91
commit 14d8d80b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ func ParseOptions(args []string) (Options, error) {
opts.SSLMode = "" opts.SSLMode = ""
} }
if opts.Prefix != "" && !strings.Contains(opts.Prefix, "/") { if opts.Prefix != "" && !strings.HasSuffix(opts.Prefix, "/") {
opts.Prefix = opts.Prefix + "/" opts.Prefix = opts.Prefix + "/"
} }