beego:fix captcha filter router
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -248,7 +248,7 @@ func NewWithFilter(urlPrefix string, store cache.Cache) *Captcha { | ... | @@ -248,7 +248,7 @@ func NewWithFilter(urlPrefix string, store cache.Cache) *Captcha { |
| 248 | cpt := NewCaptcha(urlPrefix, store) | 248 | cpt := NewCaptcha(urlPrefix, store) |
| 249 | 249 | ||
| 250 | // create filter for serve captcha image | 250 | // create filter for serve captcha image |
| 251 | beego.InsertFilter(cpt.URLPrefix+":", beego.BeforeRouter, cpt.Handler) | 251 | beego.InsertFilter(cpt.URLPrefix+"*", beego.BeforeRouter, cpt.Handler) |
| 252 | 252 | ||
| 253 | // add to template func map | 253 | // add to template func map |
| 254 | beego.AddFuncMap("create_captcha", cpt.CreateCaptchaHtml) | 254 | beego.AddFuncMap("create_captcha", cpt.CreateCaptchaHtml) | ... | ... |
-
Please register or sign in to post a comment