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 | |
parent | b03b646b035a58fb1263ad31f0166de9b0f5905b (diff) | |
download | couchdb-bed99b99ce54946c519eb6315506b74e0b6b0f93.tar.gz |
remove config: [httpd] vhost_global_handlers, redirect_vhost_handler
-rw-r--r-- | rel/overlay/etc/default.ini | 1 | ||||
-rw-r--r-- | src/couch/src/couch_httpd_vhost.erl | 16 |
2 files changed, 5 insertions, 12 deletions
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini index b4f148123..73dd947bd 100644 --- a/rel/overlay/etc/default.ini +++ b/rel/overlay/etc/default.ini @@ -133,7 +133,6 @@ port = {{backend_port}} bind_address = 127.0.0.1 authentication_handlers = {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler} secure_rewrites = true -vhost_global_handlers = _utils, _uuids, _session, _users allow_jsonp = false ; Options for the MochiWeb HTTP server. ;server_options = [{backlog, 128}, {acceptor_pool_size, 16}] 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 |