You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(api): replace gorilla/mux with net/http across agent servers
Replaces github.com/gorilla/mux (and gorilla/handlers) with the standard
library net/http across most of the agent's HTTP servers. Second step in
the series to remove gorilla entirely — follow-up to #50275.
Not included: cmd/system-probe (module router requires an API redesign)
and comp/core/gui (auth middleware scoping needs a design decision).
Key changes:
- All servers migrated: agent CMD/IPC, cluster-agent, security-agent,
process-agent, CLC runner, health probe, settings, status, fleet daemon,
flare extensions
- gorilla/handlers.RecoveryHandler replaced with pkg/api/middleware
- Fleet daemon Content-Type gate converted to a middleware
- Observability: WrapWithRouteTemplate and MountWithPrefix added to the
observability package to preserve route-template metric tags
- pkg/api/coverage.SetupCoverageHandler updated to accept *http.ServeMux;
system-probe bridges via a local http.ServeMux until it migrates
- SetupHandlers uses a two-mux dispatch to avoid a Go net/http panic:
GET /{component}/status and GET /config/{setting} both match
GET /config/status, and Go panics when registering both on the same
ServeMux since neither is strictly more specific than the other
core,github.com/gorilla/handlers,BSD-3-Clause,Copyright (c) 2023 The Gorilla Authors. All rights reserved
1443
1442
core,github.com/gorilla/mux,BSD-3-Clause,Copyright (c) 2023 The Gorilla Authors. All rights reserved
1444
1443
core,github.com/gorilla/websocket,BSD-2-Clause,Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved | Gary Burd <gary@beagledreams.com> | Google LLC (https://opensource.google.com/) | Joachim Bauch <mail@joachim-bauch.de>
1445
1444
core,github.com/gosnmp/gosnmp,BSD-2-Clause,Copyright 2012-2020 The GoSNMP Authors. All rights reserved.
0 commit comments