Pull request 2682: AGDNS-4104-fix-tls-endpoints-do-not-register
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled

Squashed commit of the following:

commit 9dfeb2cbb6a107a66518a432b33edb1343fd70b7
Merge: cc748c030 5d3859bd3
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Wed Jun 17 17:52:41 2026 +0300

    Merge branch 'master' into AGDNS-4104-fix-tls-endpoints-do-not-register

commit cc748c03049be48d8135dc9151b933949a80ede1
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Wed Jun 17 16:42:07 2026 +0300

    home: add todo;

commit d7d94b48200993ffd1d5ded7a8f7c954b1be6ee2
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Wed Jun 17 16:07:16 2026 +0300

    home: fix tls endpoints do not register
This commit is contained in:
Maksim Kazantsev 2026-06-17 14:57:08 +00:00
parent 5d3859bd36
commit 922a7aaf02
2 changed files with 3 additions and 0 deletions

View file

@ -553,6 +553,7 @@ func (web *webAPI) finalizeInstall(
web.conf.BindAddr = netip.AddrPortFrom(req.Web.IP, req.Web.Port)
web.registerControlHandlers()
web.registerTLSHandlers()
aghhttp.OK(ctx, l, w)

View file

@ -469,6 +469,8 @@ func startPprof(baseLogger *slog.Logger, port uint16) {
}
// registerTLSHandlers registers HTTP handlers for TLS configuration.
//
// TODO(m.kazantsev): Consider uniting with registerControlHandlers.
func (web *webAPI) registerTLSHandlers() {
web.httpReg.Register(http.MethodGet, "/control/tls/status", web.handleTLSStatus)
web.httpReg.Register(http.MethodPost, "/control/tls/configure", web.handleTLSConfigure)