summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd.erl
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-04-07 00:07:10 +0000
committerJan Lehnardt <jan@apache.org>2009-04-07 00:07:10 +0000
commitcf3eac0fc97cc4671c1ba86e1924b0a46d096333 (patch)
tree8c679ed0ae30270748983c25ed73d0a56d6165d7 /src/couchdb/couch_httpd.erl
parent0d608a8ea9658780bdcfe36ae700accaf006690b (diff)
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
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r--src/couchdb/couch_httpd.erl4
1 files changed, 3 insertions, 1 deletions
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