Skip to content

Commit

Permalink
docs: better comment for RedirectTrailingSlash (#67)
Browse files Browse the repository at this point in the history
add this comment for `RedirectTrailingSlash`:
```
return 404 when a <path> is not found instead redirecting to <path> + "/"
```
  • Loading branch information
PascalBourdier authored Jul 18, 2024
1 parent f0b4fbb commit 80493da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion s3proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func main() {

router := router.NewGinEngine(gin.ReleaseMode, version, urlExpiration, serverAPIKey, s3Backend)

router.RedirectTrailingSlash = false // try to keep the same behavior as gin 1.7
router.RedirectTrailingSlash = false // return 404 when a <path> is not found instead redirecting to <path> + "/"

logStartupInfo()

Expand Down
2 changes: 1 addition & 1 deletion s3proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func setup() {
}

r = router.NewGinEngine(gin.TestMode, s3proxyVersion, expiration, "", s3backend)
r.RedirectTrailingSlash = false // try to keep the same behavior as gin 1.7
r.RedirectTrailingSlash = false // return 404 when a <path> is not found instead redirecting to <path> + "/"
}

func TestMain(m *testing.M) {
Expand Down

0 comments on commit 80493da

Please sign in to comment.