MCPcopy Index your code
hub / github.com/docker/docker-agent / WithProxiedBaseURL

Function WithProxiedBaseURL

pkg/httpclient/client.go:125–136  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

123}
124
125func WithProxiedBaseURL(value string) Opt {
126 return func(o *HTTPOptions) {
127 o.Header.Set("X-Cagent-Forward", value)
128
129 // Enforce consistent headers (Anthropic client sets similar header already)
130 o.Header.Set("X-Cagent-Lang", "go")
131 o.Header.Set("X-Cagent-OS", runtime.GOOS)
132 o.Header.Set("X-Cagent-Arch", runtime.GOARCH)
133 o.Header.Set("X-Cagent-Runtime", "cagent")
134 o.Header.Set("X-Cagent-Runtime-Version", version.Version)
135 }
136}
137
138// withCagentIDSource overrides the source of the `X-Cagent-Id` header.
139// Unexported because it exists solely so tests can supply a

Calls 1

SetMethod · 0.45