mirror of
https://github.com/astaxie/beego.git
synced 2025-07-09 12:20:18 +00:00
beego: fix the namespace cond
This commit is contained in:
@ -191,6 +191,7 @@ func (n *Namespace) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if n.condition != nil && !n.condition(context) {
|
||||
http.Error(rw, "Method Not Allowed", 405)
|
||||
return
|
||||
}
|
||||
n.handlers.ServeHTTP(rw, r)
|
||||
}
|
||||
|
Reference in New Issue
Block a user