We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c4293b commit f5b43a6Copy full SHA for f5b43a6
1 file changed
modules/public/public.go
@@ -117,7 +117,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options)
117
if fi.IsDir() {
118
// Redirect if missing trailing slash.
119
if !strings.HasSuffix(ctx.Req.URL.Path, "/") {
120
- http.Redirect(ctx.Resp, ctx.Req.Request, ctx.Req.URL.Path+"/", http.StatusFound)
+ http.Redirect(ctx.Resp, ctx.Req.Request, path.Clean(ctx.Req.URL.Path+"/"), http.StatusFound)
121
return true
122
}
123
0 commit comments