proxy-header.d 1.2 KB

12345678910111213141516171819202122232425262728
  1. Long: proxy-header
  2. Arg: <header/@file>
  3. Help: Pass custom header(s) to proxy
  4. Protocols: HTTP
  5. Added: 7.37.0
  6. Category: proxy
  7. Example: --proxy-header "X-First-Name: Joe" -x http://proxy $URL
  8. Example: --proxy-header "User-Agent: surprise" -x http://proxy $URL
  9. Example: --proxy-header "Host:" -x http://proxy $URL
  10. ---
  11. Extra header to include in the request when sending HTTP to a proxy. You may
  12. specify any number of extra headers. This is the equivalent option to --header
  13. but is for proxy communication only like in CONNECT requests when you want a
  14. separate header sent to the proxy to what is sent to the actual remote host.
  15. curl will make sure that each header you add/replace is sent with the proper
  16. end-of-line marker, you should thus **not** add that as a part of the header
  17. content: do not add newlines or carriage returns, they will only mess things
  18. up for you.
  19. Headers specified with this option will not be included in requests that curl
  20. knows will not be sent to a proxy.
  21. Starting in 7.55.0, this option can take an argument in @filename style, which
  22. then adds a header for each line in the input file. Using @- will make curl
  23. read the header file from stdin.
  24. This option can be used multiple times to add/replace/remove multiple headers.