when runmode is dev it will show warning ingo
if have a attack url, the info is
Showing
1 changed file
with
3 additions
and
1 deletions
| ... | @@ -461,7 +461,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) | ... | @@ -461,7 +461,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) |
| 461 | file := staticDir + r.URL.Path[len(prefix):] | 461 | file := staticDir + r.URL.Path[len(prefix):] |
| 462 | finfo, err := os.Stat(file) | 462 | finfo, err := os.Stat(file) |
| 463 | if err != nil { | 463 | if err != nil { |
| 464 | Warn(err) | 464 | if RunMode == "dev" { |
| 465 | Warn(err) | ||
| 466 | } | ||
| 465 | http.NotFound(w, r) | 467 | http.NotFound(w, r) |
| 466 | return | 468 | return |
| 467 | } | 469 | } | ... | ... |
-
Please register or sign in to post a comment