Skip to content

Commit 35f9303

Browse files
author
Nexus
committed
fix: return 404 instead of 301 for trailing slash in parameterized routes (issue #245)
1 parent d50e13e commit 35f9303

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (ps Params) ByName(name string) string {
156156
// Path auto-correction, including trailing slashes, is enabled by default.
157157
func NewRouter(server *HttpServer) *router {
158158
return &router{
159-
RedirectTrailingSlash: true,
159+
RedirectTrailingSlash: false,
160160
RedirectFixedPath: true,
161161
HandleOPTIONS: true,
162162
allRouterExpress: make(map[string]struct{}),

0 commit comments

Comments
 (0)