mirror of
https://github.com/versity/versitygw.git
synced 2026-01-06 11:46:20 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user