Update content type for routeJSAntispam

Set to text/plain
Otherwise it's application/gzip and returns junk
This commit is contained in:
root 2020-12-29 01:43:29 +00:00
parent 43bace814d
commit ae06b5a242
1 changed files with 2 additions and 0 deletions

View File

@ -357,6 +357,8 @@ func routeJSAntispam(w http.ResponseWriter, r *http.Request, user *c.User) c.Rou
h.Write([]byte(user.GetIP()))
jsToken := hex.EncodeToString(h.Sum(nil))
w.Header().Set("Content-Type", "text/plain")
innerCode := "`document.getElementByld('golden-watch').value='" + jsToken + "';`"
io.WriteString(w, `let hihi=`+innerCode+`;hihi=hihi.replace('ld','Id');eval(hihi);`)