mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 11:20:56 +00:00
fix read /
This commit is contained in:
parent
6c92ca2a16
commit
624f6258ee
@ -555,7 +555,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(r.URL.Path, prefix) {
|
if strings.HasPrefix(r.URL.Path, prefix) {
|
||||||
if len(r.URL.Path) > len(prefix) && r.URL.Path[len(prefix)+1] != '/' {
|
if len(r.URL.Path) > len(prefix) && r.URL.Path[len(prefix)] != '/' {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
file := path.Join(staticDir, r.URL.Path[len(prefix):])
|
file := path.Join(staticDir, r.URL.Path[len(prefix):])
|
||||||
|
Loading…
Reference in New Issue
Block a user