bootstrap-client-ip
Installation
SKILL.md
Bootstrap Client IP
Add a ClientIP module to a Phoenix 1.8 app that resolves the real client IP address from reverse proxy headers, with configurable trusted proxy ranges and a conn-assigning plug.
What Gets Created/Configured
- lib/_web/client_ip.ex — Core module that extracts real IP from proxy headers
- lib/_web/plugs/client_ip.ex — Plug that assigns
:client_ipto conn - config/config.exs — Default trusted proxy config and header priority
- config/runtime.exs — Production trusted proxy config via env var (optional)
App Name Detection
Detect from mix.exs:
- App module prefix (e.g.,
MyApp) — the module namespace - OTP app name (e.g.,
:my_app) — used in config atoms - Web module prefix (e.g.,
MyAppWeb) — for web module references