all repos — captcha @ 3eb958d77bb2098ef113dcdba86035a81048fff5

Go package captcha implements generation and verification of image and audio CAPTCHAs.

In Server set headers to disable any caching.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 20 Apr 2015 16:25:46 +0200
commit

3eb958d77bb2098ef113dcdba86035a81048fff5

parent

50fb09e8128e07ae0486e239b23e323657e26bda

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M server.goserver.go

@@ -43,6 +43,9 @@ return &captchaHandler{imgWidth, imgHeight}

} func (h *captchaHandler) serve(w http.ResponseWriter, id, ext string, lang string, download bool) error { + w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") + w.Header().Set("Pragma", "no-cache") + w.Header().Set("Expires", "0") if download { w.Header().Set("Content-Type", "application/octet-stream") }