Documentation
¶
Overview ¶
Package echolog provides Echo middleware tailored for docker-agent's HTTP servers. It currently exposes a single helper, RedactedRequestLogger, that mirrors the default echo middleware.RequestLogger() but never records request bodies, raw query strings, or other places that may carry secrets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedactedRequestLogger ¶
func RedactedRequestLogger() echo.MiddlewareFunc
RedactedRequestLogger returns an Echo request-logging middleware that matches middleware.RequestLogger() in spirit (one structured slog line per request) but logs the URL path only, not the full request URI.
Echo's default logger emits v.URI, which includes the query string. Some clients pass authentication material through query parameters, which would otherwise be persisted to whichever sink slog points at. We therefore log v.URIPath (req.URL.Path) and explicitly drop the query.
Types ¶
This section is empty.