blob: c064b1ff86fb941eacf5d18bb748a1b96ad1627e [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: proxy-header
4Arg: <header/@file>
5Help: Pass custom header(s) to proxy
6Protocols: HTTP
7Added: 7.37.0
8Category: proxy
9Example: --proxy-header "X-First-Name: Joe" -x http://proxy $URL
10Example: --proxy-header "User-Agent: surprise" -x http://proxy $URL
11Example: --proxy-header "Host:" -x http://proxy $URL
12See-also: proxy
13Multi: append
14---
15Extra header to include in the request when sending HTTP to a proxy. You may
16specify any number of extra headers. This is the equivalent option to --header
17but is for proxy communication only like in CONNECT requests when you want a
18separate header sent to the proxy to what is sent to the actual remote host.
19
20curl will make sure that each header you add/replace is sent with the proper
21end-of-line marker, you should thus **not** add that as a part of the header
22content: do not add newlines or carriage returns, they will only mess things
23up for you.
24
25Headers specified with this option will not be included in requests that curl
26knows will not be sent to a proxy.
27
28Starting in 7.55.0, this option can take an argument in @filename style, which
29then adds a header for each line in the input file. Using @- will make curl
30read the header file from stdin.
31
32This option can be used multiple times to add/replace/remove multiple headers.