🐛 fix content-type header for ban and captcha page (#166)

* 🍱 fix content-type header for ban and captcha page

* 🍱 Add comment to warn future developer

---------

Co-authored-by: max.lerebourg <max.lerebourg@monisnap.com>
This commit is contained in:
maxlerebourg
2024-05-16 18:40:28 +02:00
committed by GitHub
co-authored by max.lerebourg
parent 8975216af8
commit 70ad0365f0
2 changed files with 9 additions and 4 deletions
+2
View File
@@ -86,6 +86,8 @@ func (c *Client) ServeHTTP(rw http.ResponseWriter, r *http.Request, remoteIP str
http.Redirect(rw, r, r.URL.String(), http.StatusFound)
return
}
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
rw.WriteHeader(http.StatusOK)
err = c.captchaTemplate.Execute(rw, map[string]string{
"SiteKey": c.siteKey,
"FrontendJS": captcha[c.provider].js,