Add solved-captcha as option of remediationCustomHeader (#310)

This commit is contained in:
maxlerebourg
2026-01-23 11:36:32 +01:00
committed by GitHub
parent efb3a67019
commit 889c5b55fe
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -94,6 +94,9 @@ func (c *Client) ServeHTTP(rw http.ResponseWriter, r *http.Request, remoteIP str
if valid {
c.log.Debug("captcha:ServeHTTP captcha:valid")
c.cacheClient.Set(remoteIP+"_captcha", cache.CaptchaDoneValue, c.gracePeriodSeconds)
if c.remediationCustomHeader != "" {
rw.Header().Set(c.remediationCustomHeader, "solved-captcha")
}
http.Redirect(rw, r, r.URL.String(), http.StatusFound)
return
}