1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 10:40:40 +00:00

Merge pull request #1546 from youngsterxyf/develop

fix #1530
This commit is contained in:
astaxie
2016-01-12 20:01:51 +08:00
10 changed files with 45 additions and 42 deletions

View File

@ -64,6 +64,7 @@ import (
"net/http"
"path"
"strings"
"time"
"github.com/astaxie/beego"
"github.com/astaxie/beego/cache"
@ -78,7 +79,7 @@ var (
const (
// default captcha attributes
challengeNums = 6
expiration = 600
expiration = 600 * time.Second
fieldIDName = "captcha_id"
fieldCaptchaName = "captcha"
cachePrefix = "captcha_"
@ -106,7 +107,7 @@ type Captcha struct {
ChallengeNums int
// captcha expiration seconds
Expiration int64
Expiration time.Duration
// cache key prefix
CachePrefix string