summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2018-09-13 15:08:10 +0200
committerJan Lehnardt <jan@apache.org>2018-11-09 14:51:33 +0100
commitbed99b99ce54946c519eb6315506b74e0b6b0f93 (patch)
tree209dc63ec0561971d3ede9e1c8f687febbccdee1 /src
parentb03b646b035a58fb1263ad31f0166de9b0f5905b (diff)
downloadcouchdb-bed99b99ce54946c519eb6315506b74e0b6b0f93.tar.gz
remove config: [httpd] vhost_global_handlers, redirect_vhost_handler
Diffstat (limited to 'src')
-rw-r--r--src/couch/src/couch_httpd_vhost.erl16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/couch/src/couch_httpd_vhost.erl b/src/couch/src/couch_httpd_vhost.erl
index d8f952190..574dba9c8 100644
--- a/src/couch/src/couch_httpd_vhost.erl
+++ b/src/couch/src/couch_httpd_vhost.erl
@@ -380,10 +380,6 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
-handle_config_change("httpd", "vhost_global_handlers", _, _, _) ->
- {ok, ?MODULE:reload()};
-handle_config_change("httpd", "redirect_vhost_handler", _, _, _) ->
- {ok, ?MODULE:reload()};
handle_config_change("vhosts", _, _, _, _) ->
{ok, ?MODULE:reload()};
handle_config_change(_, _, _, _, _) ->
@@ -396,25 +392,23 @@ handle_config_terminate(_Server, _Reason, _State) ->
load_conf() ->
%% get vhost globals
- VHostGlobals = re:split(config:get("httpd",
- "vhost_global_handlers",""), "\\s*,\\s*",[{return, list}]),
+ VHostGlobals = re:split("_utils, _uuids, _session, _users", "\\s*,\\s*",
+ [{return, list}]),
%% build vhosts matching rules
VHosts = make_vhosts(),
%% build vhosts handler fun
DefaultVHostFun = "{couch_httpd_vhost, redirect_to_vhost}",
- Fun = couch_httpd:make_arity_2_fun(config:get("httpd",
- "redirect_vhost_handler", DefaultVHostFun)),
+ Fun = couch_httpd:make_arity_2_fun(DefaultVHostFun),
{VHostGlobals, VHosts, Fun}.
%% cheaply determine if there are any virtual hosts
%% configured at all.
vhost_enabled() ->
- case {config:get("httpd", "vhost_global_handlers"),
- config:get("vhosts")} of
- {undefined, []} ->
+ case config:get("vhosts") of
+ [] ->
false;
_ ->
true