Adds a `health` subcommand and `--healthcheck` flag that performs an HTTP GET against the running oauth2-proxy's /ping endpoint, returning exit 0 on HTTP 200 and exit 1 otherwise. This eliminates the need to add curl or wget to distroless container images for Docker health checks. Two invocation modes: - `oauth2-proxy health` (subcommand with own flags) - `oauth2-proxy --healthcheck` (reads proxy config for address/ping-path) The health subcommand supports: - --http-address / --https-address to target the correct listener - --ping-path for custom ping endpoint paths - --timeout for configurable request timeout (default 5s) - --insecure-skip-verify for self-signed TLS certificates - Automatic wildcard-to-loopback address translation (0.0.0.0 -> 127.0.0.1) - HTTP-first with HTTPS fallback Also adds HEALTHCHECK instruction to the Dockerfile. Zero external dependencies - uses only net/http from the Go standard library. Closes #2555 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| apis | ||
| app | ||
| authentication | ||
| cookies | ||
| encryption | ||
| header | ||
| healthcheck | ||
| ip | ||
| logger | ||
| middleware | ||
| providers | ||
| proxyhttp | ||
| requests | ||
| sessions | ||
| upstream | ||
| util | ||
| validation | ||
| version | ||
| watcher | ||