From cf3eac0fc97cc4671c1ba86e1924b0a46d096333 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 7 Apr 2009 00:07:10 +0000 Subject: Add null_authentication_handler. It is useful when running CouchDB behind an authenticating proxy which proxies the basic auth http headers to CouchDB. Having no admins defined makes authentication impossible. Use the null_authentication_handler instead. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@762574 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/couchdb/couch_httpd.erl') diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index aa78ebb2..1e0bd9d4 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -24,7 +24,7 @@ -export([send_response/4,send_method_not_allowed/2,send_error/4, send_redirect/2]). -export([send_json/2,send_json/3,send_json/4]). -export([default_authentication_handler/1,special_test_authentication_handler/1]). - +-export([null_authentication_handler/1]). start_link() -> % read config and register for configuration changes @@ -228,6 +228,8 @@ default_authentication_handler(Req) -> end end. +null_authentication_handler(_Req) -> + #user_ctx{roles=[<<"_admin">>]}. % Utilities -- cgit v1.2.3