Documentation
¶
Overview ¶
Package api wires the HTTP surface together: REST endpoints for auth and Docker operations, the WebSocket upgrade, and serving the embedded SPA.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PProfHandler ¶ added in v1.4.0
PProfHandler returns an http.Handler exposing Go's net/http/pprof endpoints under /debug/pprof.
It carries NO authentication or IP filtering by design: the caller MUST serve it only on a loopback-bound listener (see cmd/dockercmd's pprof server). That is deliberate — gating by client IP on the *main* router would be unsafe, because the app runs behind chi's RealIP middleware, which rewrites r.RemoteAddr from the (spoofable) X-Forwarded-For / X-Real-IP headers. A physically loopback-only listener can't be reached off-box regardless of headers, so it's the correct boundary for endpoints that leak goroutine stacks / heap layout and can stall the process (/profile).
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server bundles all dependencies needed to serve HTTP.
Source Files
¶
- access_middleware.go
- alert_handlers.go
- auth_handlers.go
- client_ip.go
- container_lifecycle_handlers.go
- docker_handlers.go
- events_handler.go
- exec_handler.go
- files_handlers.go
- health_handlers.go
- history_handler.go
- host_handlers.go
- image_handlers.go
- ldap_handlers.go
- mcp_admin_handlers.go
- mcp_projects.go
- mcp_token_handlers.go
- metrics.go
- middleware.go
- oauth_handlers.go
- parse_rules_handlers.go
- pprof.go
- prefs_handlers.go
- project_handlers.go
- registry_handlers.go
- respond.go
- server.go
- settings_handlers.go
- smtp_handlers.go
- spa.go
- stack_handlers.go
- template_handlers.go
- update_handlers.go
- user_handlers.go
- volume_files_handlers.go
- volume_handlers.go
- ws_handler.go