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
|
|
@ -145,12 +145,16 @@ func New(opts Options) (*Server, error) {
|
|||
}), "GET")
|
||||
}
|
||||
|
||||
registerWithPrefix(anubis.APIPrefix+"make-challenge", http.HandlerFunc(result.MakeChallenge), "POST")
|
||||
registerWithPrefix(anubis.APIPrefix+"pass-challenge", http.HandlerFunc(result.PassChallenge), "GET")
|
||||
registerWithPrefix(anubis.APIPrefix+"check", http.HandlerFunc(result.maybeReverseProxyHttpStatusOnly), "")
|
||||
registerWithPrefix(anubis.APIPrefix+"test-error", http.HandlerFunc(result.TestError), "GET")
|
||||
registerWithPrefix("/", http.HandlerFunc(result.maybeReverseProxyOrPage), "")
|
||||
|
||||
//goland:noinspection GoBoolExpressions
|
||||
if anubis.Version == "devel" {
|
||||
// make-challenge is only used in tests. Only enable while version is devel
|
||||
registerWithPrefix(anubis.APIPrefix+"make-challenge", http.HandlerFunc(result.MakeChallenge), "POST")
|
||||
}
|
||||
|
||||
for _, implKind := range challenge.Methods() {
|
||||
impl, _ := challenge.Get(implKind)
|
||||
impl.Setup(mux)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue