1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 07:10:55 +00:00
This commit is contained in:
astaxie 2014-06-11 13:26:45 +08:00
parent deb553be7f
commit aa275fb5ce

View File

@ -35,10 +35,6 @@ func serverStaticRouter(ctx *context.Context) {
if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
continue
}
if requestPath == prefix && prefix[len(prefix)-1] != '/' {
http.Redirect(ctx.ResponseWriter, ctx.Request, requestPath+"/", 302)
return
}
file := path.Join(staticDir, requestPath[len(prefix):])
finfo, err := os.Stat(file)
if err != nil {