mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 23:11:27 +00:00
beego:fix captcha filter router
This commit is contained in:
parent
085c362ffb
commit
469f283b68
@ -248,7 +248,7 @@ func NewWithFilter(urlPrefix string, store cache.Cache) *Captcha {
|
|||||||
cpt := NewCaptcha(urlPrefix, store)
|
cpt := NewCaptcha(urlPrefix, store)
|
||||||
|
|
||||||
// create filter for serve captcha image
|
// 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
|
// add to template func map
|
||||||
beego.AddFuncMap("create_captcha", cpt.CreateCaptchaHtml)
|
beego.AddFuncMap("create_captcha", cpt.CreateCaptchaHtml)
|
||||||
|
Loading…
Reference in New Issue
Block a user