diff options
| author | Jan Lehnardt <jan@apache.org> | 2018-09-13 15:08:10 +0200 |
|---|---|---|
| committer | Jan Lehnardt <jan@apache.org> | 2018-11-09 14:51:33 +0100 |
| commit | bed99b99ce54946c519eb6315506b74e0b6b0f93 (patch) | |
| tree | 209dc63ec0561971d3ede9e1c8f687febbccdee1 /src | |
| parent | b03b646b035a58fb1263ad31f0166de9b0f5905b (diff) | |
| download | couchdb-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.erl | 16 |
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 |
