New: Inject Mode for Secrets Transform
Secrets can now be injected directly onto matching requests without requiring the client to send a proxy token. In inject mode, the proxy unconditionally sets a header or query parameter on every request that matches the secret's rules. This is useful when sandboxed workloads should never see credentials at all.
A Go template formatter field controls the header value. The template receives .Value (the resolved secret) and a variadic base64 helper that concatenates and base64-encodes its arguments.
transforms:
- name: secrets
config:
secrets:
- source:
type: env
var: OPENAI_API_KEY
inject:
header: "Authorization"
formatter: "Bearer {{ .Value }}"
rules:
- host: "api.openai.com"
methods: ["POST"]
paths: ["/v1/*"]Inject mode also supports query parameters (omit formatter):
- source:
type: env
var: MAPS_API_KEY
inject:
query_param: "key"
rules:
- host: "maps.googleapis.com"The existing replace behavior now lives under an explicit replace: block. Legacy top-level fields (proxy_value, match_headers, etc.) remain supported for backwards compatibility.