Lightweight coding agent that runs in your terminal
Rust
docs: clarify responses proxy metadata (#5406)
Thibault Sottiauxc37469b5ba80
diff --git a/codex-rs/responses-api-proxy/README.md b/codex-rs/responses-api-proxy/README.mdindex 31ac9c45c4..1109271c1d 100644--- a/codex-rs/responses-api-proxy/README.md+++ b/codex-rs/responses-api-proxy/README.md@@ -33,8 +33,8 @@ curl --fail --silent --show-error "${PROXY_BASE_URL}/shutdown"- Reads the API key from `stdin`. All callers should pipe the key in (for example, `printenv OPENAI_API_KEY | codex-responses-api-proxy`).- Formats the header value as `Bearer <key>` and attempts to `mlock(2)` the memory holding that header so it is not swapped to disk.- Listens on the provided port or an ephemeral port if `--port` is not specified.-- Accepts exactly `POST /v1/responses` (no query string). The request body is forwarded to `https://api.openai.com/v1/responses` with `Authorization: Bearer <key>` set. All original request headers (except any incoming `Authorization`) are forwarded upstream. For other requests, it responds with `403`.-- Optionally writes a single-line JSON file with server info, currently `{ "port": <u16> }`.+- Accepts exactly `POST /v1/responses` (no query string). The request body is forwarded to `https://api.openai.com/v1/responses` with `Authorization: Bearer <key>` set. All original request headers (except any incoming `Authorization`) are forwarded upstream, with `Host` overridden to `api.openai.com`. For other requests, it responds with `403`.+- Optionally writes a single-line JSON file with server info, currently `{ "port": <u16>, "pid": <u32> }`.- Optional `--http-shutdown` enables `GET /shutdown` to terminate the process with exit code `0`. This allows one user (e.g., `root`) to start the proxy and another unprivileged user on the host to shut it down.## CLI@@ -50,7 +50,7 @@ codex-responses-api-proxy [--port <PORT>] [--server-info <FILE>] [--http-shutdow## Notes- Only `POST /v1/responses` is permitted. No query strings are allowed.-- All request headers are forwarded to the upstream call (aside from overriding `Authorization`). Response status and content-type are mirrored from upstream.+- All request headers are forwarded to the upstream call (aside from overriding `Authorization` and `Host`). Response status and content-type are mirrored from upstream.## Hardening Details