|
@@ -142,13 +142,14 @@ func (c *AuthController) Me() { |
|
@@ -142,13 +142,14 @@ func (c *AuthController) Me() { |
142
|
}
|
142
|
}
|
143
|
|
143
|
|
144
|
const (
|
144
|
const (
|
145
|
- captchaID = "48a6ebac4ebc6642d68c217fca33eb4d"
|
|
|
146
|
- privateKey = "4f1c085290bec5afdc54df73535fc361"
|
145
|
+ captchaID = "33a2abf9c5df0d6bc3b89fb39280114b"
|
|
|
146
|
+ privateKey = "13320fd2b10199e9a2440a4fbb4d46f7"
|
147
|
)
|
147
|
)
|
148
|
|
148
|
|
149
|
func (c *AuthController) RegisterGeetest() {
|
149
|
func (c *AuthController) RegisterGeetest() {
|
150
|
geetest := geetest.NewGeetestLib(captchaID, privateKey, 2*time.Second)
|
150
|
geetest := geetest.NewGeetestLib(captchaID, privateKey, 2*time.Second)
|
151
|
- status, responseBt := geetest.PreProcess("", "")
|
151
|
+ userip := c.Ctx.Input.IP()
|
|
|
152
|
+ status, responseBt := geetest.PreProcess("", userip)
|
152
|
c.SetSession("geetest_status", status)
|
153
|
c.SetSession("geetest_status", status)
|
153
|
c.Ctx.Output.Body(responseBt)
|
154
|
c.Ctx.Output.Body(responseBt)
|
154
|
return
|
155
|
return
|