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