docs: clarify responses proxy metadata (#5406)
This commit is contained in:
committed by
GitHub
parent
c782f8c68d
commit
c37469b5ba
@@ -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`).
|
- 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.
|
- 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.
|
- 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`.
|
- 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> }`.
|
- 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.
|
- 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
|
## CLI
|
||||||
@@ -50,7 +50,7 @@ codex-responses-api-proxy [--port <PORT>] [--server-info <FILE>] [--http-shutdow
|
|||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Only `POST /v1/responses` is permitted. No query strings are allowed.
|
- 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
|
## Hardening Details
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user