Compare commits

..

2 Commits

Author SHA1 Message Date
aardouin d23311f5b0 fix(test) #1 Correction scenario 2024-10-04 11:11:49 +02:00
aardouin fad9b38b7e feat(test) #1 Ajout d'un test de charge 2024-10-04 10:32:54 +02:00
2 changed files with 10 additions and 11 deletions

View File

@ -83,7 +83,7 @@ func (s *Server) submitHandler(w http.ResponseWriter, r *http.Request) {
return return
} }
if !verified && !s.config.DisableValidation { if !verified {
slog.Debug("Invalid solution") slog.Debug("Invalid solution")
http.Error(w, "Invalid solution", http.StatusBadRequest) http.Error(w, "Invalid solution", http.StatusBadRequest)
return return

View File

@ -10,5 +10,4 @@ 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"`
} }