Compare commits
3 Commits
d23311f5b0
...
082ab9a7ea
Author | SHA1 | Date |
---|---|---|
aardouin | 082ab9a7ea | |
aardouin | 8ce504a593 | |
Valentin Carroy | bc3a0886b0 |
|
@ -83,7 +83,7 @@ func (s *Server) submitHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !verified {
|
if !verified && !s.config.DisableValidation {
|
||||||
slog.Debug("Invalid solution")
|
slog.Debug("Invalid solution")
|
||||||
http.Error(w, "Invalid solution", http.StatusBadRequest)
|
http.Error(w, "Invalid solution", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
|
|
|
@ -10,4 +10,5 @@ type Config struct {
|
||||||
Expire string `env:"ALTCHA_EXPIRE" envDefault:"600"`
|
Expire string `env:"ALTCHA_EXPIRE" envDefault:"600"`
|
||||||
CheckExpire bool `env:"ALTCHA_CHECK_EXPIRE" envDefault:"1"`
|
CheckExpire bool `env:"ALTCHA_CHECK_EXPIRE" envDefault:"1"`
|
||||||
Debug bool `env:"ALTCHA_DEBUG" envDefault:"false"`
|
Debug bool `env:"ALTCHA_DEBUG" envDefault:"false"`
|
||||||
|
DisableValidation bool `env:"ATLCHA_DISABLE_VALIDATION" envDefault:"false"`
|
||||||
}
|
}
|
Loading…
Reference in New Issue