mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 07:51:30 +00:00
when runmode is dev it will show warning ingo
if have a attack url, the info is
This commit is contained in:
parent
43057a2fcb
commit
2f75445520
@ -461,7 +461,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
file := staticDir + r.URL.Path[len(prefix):]
|
file := staticDir + r.URL.Path[len(prefix):]
|
||||||
finfo, err := os.Stat(file)
|
finfo, err := os.Stat(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if RunMode == "dev" {
|
||||||
Warn(err)
|
Warn(err)
|
||||||
|
}
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user