style: Some minor fixes (#548)
* chore(deps): update dependencies in go.mod and go.sum Signed-off-by: Jason Cameron <git@jasoncameron.dev> * refactor: rename variables for clarity in anubis.go and main.go Signed-off-by: Jason Cameron <git@jasoncameron.dev> * fix(checker): handle error when inserting IP range in ranger Signed-off-by: Jason Cameron <git@jasoncameron.dev> * fix(tests): simplify boolean checks in header and URL value tests Signed-off-by: Jason Cameron <git@jasoncameron.dev> * refactor(api): remove unused /test-error endpoint and restrict /make-challenge to development Signed-off-by: Jason Cameron <git@jasoncameron.dev> * build(deps): update golang-set to v2.8.0 in go.sum Signed-off-by: Jason Cameron <git@jasoncameron.dev> * Update metadata check-spelling run (pull_request) for json/stuff Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev> Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
This commit is contained in:
parent
8eff57fcb6
commit
9539668049
11 changed files with 112 additions and 56 deletions
|
|
@ -66,10 +66,10 @@ type Server struct {
|
|||
policy *policy.ParsedConfig
|
||||
DNSBLCache *decaymap.Impl[string, dnsbl.DroneBLResponse]
|
||||
OGTags *ogtags.OGTagCache
|
||||
cookieName string
|
||||
priv ed25519.PrivateKey
|
||||
pub ed25519.PublicKey
|
||||
opts Options
|
||||
cookieName string
|
||||
}
|
||||
|
||||
func (s *Server) challengeFor(r *http.Request, difficulty int) string {
|
||||
|
|
@ -402,11 +402,6 @@ func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
|||
http.Redirect(w, r, redir, http.StatusFound)
|
||||
}
|
||||
|
||||
func (s *Server) TestError(w http.ResponseWriter, r *http.Request) {
|
||||
err := r.FormValue("err")
|
||||
s.respondWithError(w, r, err)
|
||||
}
|
||||
|
||||
func cr(name string, rule config.Rule) policy.CheckResult {
|
||||
return policy.CheckResult{
|
||||
Name: name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue