Skip to content

Commit 42c57dc

Browse files
authored
docs: clarify responses proxy metadata (openai#5406)
1 parent fc9b4e7 commit 42c57dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codex-rs/responses-api-proxy/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ curl --fail --silent --show-error "${PROXY_BASE_URL}/shutdown"
3333
- Reads the API key from `stdin`. All callers should pipe the key in (for example, `printenv OPENAI_API_KEY | codex-responses-api-proxy`).
3434
- Formats the header value as `Bearer <key>` and attempts to `mlock(2)` the memory holding that header so it is not swapped to disk.
3535
- Listens on the provided port or an ephemeral port if `--port` is not specified.
36-
- 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`.
37-
- Optionally writes a single-line JSON file with server info, currently `{ "port": <u16> }`.
36+
- 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`.
37+
- Optionally writes a single-line JSON file with server info, currently `{ "port": <u16>, "pid": <u32> }`.
3838
- 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.
3939

4040
## CLI
@@ -50,7 +50,7 @@ codex-responses-api-proxy [--port <PORT>] [--server-info <FILE>] [--http-shutdow
5050
## Notes
5151

5252
- Only `POST /v1/responses` is permitted. No query strings are allowed.
53-
- All request headers are forwarded to the upstream call (aside from overriding `Authorization`). Response status and content-type are mirrored from upstream.
53+
- All request headers are forwarded to the upstream call (aside from overriding `Authorization` and `Host`). Response status and content-type are mirrored from upstream.
5454

5555
## Hardening Details
5656

0 commit comments

Comments
 (0)