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

beego:fix captcha filter router

This commit is contained in:
astaxie 2014-06-19 20:29:36 +08:00
parent 085c362ffb
commit 469f283b68

View File

@ -248,7 +248,7 @@ func NewWithFilter(urlPrefix string, store cache.Cache) *Captcha {
cpt := NewCaptcha(urlPrefix, store)
// create filter for serve captcha image
beego.InsertFilter(cpt.URLPrefix+":", beego.BeforeRouter, cpt.Handler)
beego.InsertFilter(cpt.URLPrefix+"*", beego.BeforeRouter, cpt.Handler)
// add to template func map
beego.AddFuncMap("create_captcha", cpt.CreateCaptchaHtml)