Browse Source

debugging changes

master
forest 3 weeks ago
parent
commit
423bd91e04
3 changed files with 8 additions and 2 deletions
  1. +1
    -1
      build-docker.sh
  2. +1
    -1
      disallowbots.gotemplate.html
  3. +6
    -0
      main.go

+ 1
- 1
build-docker.sh View File

@ -1,6 +1,6 @@
#!/bin/bash -e
VERSION="0.2.3-test1"
VERSION="0.2.3-test3"
rm -rf dockerbuild || true
mkdir dockerbuild


+ 1
- 1
disallowbots.gotemplate.html View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/static/application.css">
<link rel="stylesheet" type="text/css" href="{{ .CaptchaURL }}/static/captcha.css">
<script src="{{ .CaptchaURL }}/static/captcha.js?v=2"></script>
<script src="{{ .CaptchaURL }}/static/captcha.js?v=3"></script>
</head>
<body>


+ 6
- 0
main.go View File

@ -581,6 +581,12 @@ func validateCaptcha(apiToken, challenge, nonce string) error {
}
if response.StatusCode != 200 {
responseString := "http read error"
responseBytes, err := ioutil.ReadAll(response.Body)
if err == nil {
responseString = string(responseBytes)
}
log.Printf("proof of work captcha validation failed: challenge: %s nonce: %s, response: %s\n", challenge, nonce, responseString)
return errors.New("proof of work captcha validation failed. please try again.")
}
return nil


Loading…
Cancel
Save