mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:20:55 +00:00
beego:fix #639
This commit is contained in:
parent
deb553be7f
commit
aa275fb5ce
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user