]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy: Add support for an optional third argument to ProxyRemote*
authorJoe Orton <jorton@apache.org>
Thu, 17 Sep 2020 11:31:43 +0000 (11:31 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 17 Sep 2020 11:31:43 +0000 (11:31 +0000)
commitc77e6abe3b1d3d612bcf5ce694c8c937cf031fbb
treedda4b5468d62457485dbc04bb3f66dcea3a5d5a9
parent250bd58c5d2f5dcb8da2993987694e357f787b14
mod_proxy: Add support for an optional third argument to ProxyRemote*
to configure the Basic auth credentials to send to the remote proxy.

(Note that credentials are always sent w/o waiting for a challenge as
with proxy-chain-auth, and only Basic is supported - both of which are
not exactly ideal - but better than nothing.)

* modules/proxy/mod_proxy.h (struct proxy_remote): Add creds field.

* modules/proxy/mod_proxy.c (proxy_handler): Pass forward proxy
  credentials via r->notes.
  (add_proxy): Take credentials and base64-encode into ->creds field if
  passed.
  (add_proxy_noregex, add_proxy_regex): Take optional creds argument.

* modules/proxy/proxy_util.c (ap_proxy_determine_connection):
  Use proxy credentials from r->notes if available.
  (ap_proxy_create_hdrbrgd): Set Proxy-Authorization header from
  credentials in r->notes if present.

PR: 37355
Github: closes #135

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881790 13f79535-47bb-0310-9956-ffa450edef68
changes-entries/pr37355.txt [new file with mode: 0644]
docs/manual/mod/mod_proxy.xml
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h
modules/proxy/proxy_util.c