fix(lib/challenge): allow challenges to register HTTP routes (#620)

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-06-05 20:26:23 -04:00 committed by GitHub
parent 5f3861ab37
commit 5a7499ea3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 5 deletions

View file

@ -151,6 +151,11 @@ func New(opts Options) (*Server, error) {
registerWithPrefix(anubis.APIPrefix+"test-error", http.HandlerFunc(result.TestError), "GET")
registerWithPrefix("/", http.HandlerFunc(result.maybeReverseProxyOrPage), "")
for _, implKind := range challenge.Methods() {
impl, _ := challenge.Get(implKind)
impl.Setup(mux)
}
result.mux = mux
return result, nil