Update content type for routeJSAntispam
Set to text/plain Otherwise it's application/gzip and returns junk
This commit is contained in:
parent
43bace814d
commit
ae06b5a242
|
@ -357,6 +357,8 @@ func routeJSAntispam(w http.ResponseWriter, r *http.Request, user *c.User) c.Rou
|
||||||
h.Write([]byte(user.GetIP()))
|
h.Write([]byte(user.GetIP()))
|
||||||
jsToken := hex.EncodeToString(h.Sum(nil))
|
jsToken := hex.EncodeToString(h.Sum(nil))
|
||||||
|
|
||||||
|
w.Header().Set("Content-Type", "text/plain")
|
||||||
|
|
||||||
innerCode := "`document.getElementByld('golden-watch').value='" + jsToken + "';`"
|
innerCode := "`document.getElementByld('golden-watch').value='" + jsToken + "';`"
|
||||||
io.WriteString(w, `let hihi=`+innerCode+`;hihi=hihi.replace('ld','Id');eval(hihi);`)
|
io.WriteString(w, `let hihi=`+innerCode+`;hihi=hihi.replace('ld','Id');eval(hihi);`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue