diff --git a/s3api/middlewares/host-style-parser.go b/s3api/middlewares/host-style-parser.go index f670caf..5f6445b 100644 --- a/s3api/middlewares/host-style-parser.go +++ b/s3api/middlewares/host-style-parser.go @@ -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)