Merge pull request #1548 from versity/sis/host-style-trailing-slash

fix: removes trailing / for bucket operations in host-style parser
This commit is contained in:
Ben McClelland
2025-09-22 10:45:53 -07:00
committed by GitHub

View File

@@ -32,6 +32,10 @@ func HostStyleParser(virtualDomain string) fiber.Handler {
return ctx.Next()
}
path := ctx.Path()
if path == "/" {
// omit the trailing / for bucket operations
path = ""
}
pathStyleUrl := fmt.Sprintf("/%v%v", bucket, path)
ctx.Path(pathStyleUrl)