diff options
author | Jan Lehnardt <jan@apache.org> | 2018-07-13 17:17:59 +0200 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2018-07-13 19:49:09 +0200 |
commit | e928b886252467189909bea6721a173eb2695aac (patch) | |
tree | 714f484930e28bf3910de207ca79abffd9f343ab | |
parent | 572234fb5026ae64ec7f6ed84728f2b1ef63d955 (diff) | |
download | couchdb-e928b886252467189909bea6721a173eb2695aac.tar.gz |
hook up proxy auth handler to chttpd
-rw-r--r-- | rel/overlay/etc/default.ini | 5 | ||||
-rw-r--r-- | src/chttpd/src/chttpd_auth.erl | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini index 5f77e7b5d..0f0d54793 100644 --- a/rel/overlay/etc/default.ini +++ b/rel/overlay/etc/default.ini @@ -93,6 +93,11 @@ prefer_minimal = Cache-Control, Content-Length, Content-Range, Content-Type, ETa ; _dbs_info in a request max_db_number_for_dbs_info_req = 100 +; authentication handlers +; authentication_handlers = {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler} +; uncomment the next line to enable proxy authentication +; authentication_handlers = {chttpd_auth, proxy_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler} + [database_compaction] ; larger buffer sizes can originate smaller files doc_buffer_size = 524288 ; value in bytes diff --git a/src/chttpd/src/chttpd_auth.erl b/src/chttpd/src/chttpd_auth.erl index be12148f3..6602468e1 100644 --- a/src/chttpd/src/chttpd_auth.erl +++ b/src/chttpd/src/chttpd_auth.erl @@ -17,6 +17,7 @@ -export([default_authentication_handler/1]). -export([cookie_authentication_handler/1]). +-export([proxy_authentication_handler/1]). -export([party_mode_handler/1]). -export([handle_session_req/1]). @@ -47,6 +48,9 @@ default_authentication_handler(Req) -> cookie_authentication_handler(Req) -> couch_httpd_auth:cookie_authentication_handler(Req, chttpd_auth_cache). +proxy_authentication_handler(Req) -> + couch_httpd_auth:proxy_authentication_handler(Req). + party_mode_handler(Req) -> case config:get("chttpd", "require_valid_user", "false") of "true" -> |