2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-16 21:20:36 +08:00
|
|
|
Long: proxy-header
|
2017-06-15 17:08:31 +08:00
|
|
|
Arg: <header/@file>
|
|
|
|
Help: Pass custom header(s) to proxy
|
2016-11-16 21:20:36 +08:00
|
|
|
Protocols: HTTP
|
|
|
|
Added: 7.37.0
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: proxy
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: --proxy-header "X-First-Name: Joe" -x http://proxy $URL
|
|
|
|
Example: --proxy-header "User-Agent: surprise" -x http://proxy $URL
|
|
|
|
Example: --proxy-header "Host:" -x http://proxy $URL
|
2021-11-15 22:58:20 +08:00
|
|
|
See-also: proxy
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: append
|
2016-11-16 21:20:36 +08:00
|
|
|
---
|
|
|
|
Extra header to include in the request when sending HTTP to a proxy. You may
|
|
|
|
specify any number of extra headers. This is the equivalent option to --header
|
|
|
|
but is for proxy communication only like in CONNECT requests when you want a
|
|
|
|
separate header sent to the proxy to what is sent to the actual remote host.
|
|
|
|
|
|
|
|
curl will make sure that each header you add/replace is sent with the proper
|
2021-03-22 23:50:57 +08:00
|
|
|
end-of-line marker, you should thus **not** add that as a part of the header
|
2016-11-16 21:20:36 +08:00
|
|
|
content: do not add newlines or carriage returns, they will only mess things
|
|
|
|
up for you.
|
|
|
|
|
|
|
|
Headers specified with this option will not be included in requests that curl
|
|
|
|
knows will not be sent to a proxy.
|
|
|
|
|
2017-06-15 17:08:31 +08:00
|
|
|
Starting in 7.55.0, this option can take an argument in @filename style, which
|
|
|
|
then adds a header for each line in the input file. Using @- will make curl
|
|
|
|
read the header file from stdin.
|
|
|
|
|
2016-11-16 21:20:36 +08:00
|
|
|
This option can be used multiple times to add/replace/remove multiple headers.
|