Fix typo
This commit is contained in:
parent
0a0fc47655
commit
f358af6f56
@ -112,7 +112,7 @@ var runCmd = &cli.Command{
|
|||||||
WalletRate: 15 * time.Minute,
|
WalletRate: 15 * time.Minute,
|
||||||
WalletBurst: 2,
|
WalletBurst: 2,
|
||||||
}),
|
}),
|
||||||
recapTreshold: cctx.Float64("captcha-threshold"),
|
recapThreshold: cctx.Float64("captcha-threshold"),
|
||||||
}
|
}
|
||||||
|
|
||||||
box := rice.MustFindBox("site")
|
box := rice.MustFindBox("site")
|
||||||
@ -149,7 +149,7 @@ type handler struct {
|
|||||||
sendPerRequest types.FIL
|
sendPerRequest types.FIL
|
||||||
|
|
||||||
limiter *Limiter
|
limiter *Limiter
|
||||||
recapTreshold float64
|
recapThreshold float64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -172,7 +172,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
http.Error(w, err.Error(), http.StatusBadGateway)
|
http.Error(w, err.Error(), http.StatusBadGateway)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !capResp.Success || capResp.Score < h.recapTreshold {
|
if !capResp.Success || capResp.Score < h.recapThreshold {
|
||||||
log.Infow("spam", "capResp", capResp)
|
log.Infow("spam", "capResp", capResp)
|
||||||
http.Error(w, "spam protection", http.StatusUnprocessableEntity)
|
http.Error(w, "spam protection", http.StatusUnprocessableEntity)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user