1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 14:10:49 +00:00

when runmode is dev it will show warning ingo

if have a attack url, the info is
This commit is contained in:
astaxie 2013-11-10 23:42:07 +08:00
parent 43057a2fcb
commit 2f75445520

View File

@ -461,7 +461,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
file := staticDir + r.URL.Path[len(prefix):]
finfo, err := os.Stat(file)
if err != nil {
Warn(err)
if RunMode == "dev" {
Warn(err)
}
http.NotFound(w, r)
return
}