diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-08-08 17:46:26 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-08-08 17:46:26 +0300 |
commit | 3fec782494042ab1e1a015524e01cd63e6757c7e (patch) | |
tree | 55be45f1d6861e5e8de6c33648a447d87e27eb4c /src/mod_proxy65.erl | |
parent | Fix tests for 8679cfd2f (diff) |
Introduce 'hosts' option
The option can be used as a replacement of 'host' option
when several (sub)domains are needed to be registered for the module.
Note that you cannot combine both 'host' and 'hosts' in the config
because 'host' option is of a higher priority. Example:
mod_pubsub:
...
hosts:
- "pubsub1.@HOST@"
- "pubsub2.@HOST@"
Fixes #1883
Diffstat (limited to 'src/mod_proxy65.erl')
-rw-r--r-- | src/mod_proxy65.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_proxy65.erl b/src/mod_proxy65.erl index aee32496..671baef9 100644 --- a/src/mod_proxy65.erl +++ b/src/mod_proxy65.erl @@ -112,6 +112,8 @@ depends(_Host, _Opts) -> mod_opt_type(access) -> fun acl:access_rules_validator/1; mod_opt_type(host) -> fun iolist_to_binary/1; +mod_opt_type(hosts) -> + fun(L) -> lists:map(fun iolist_to_binary/1, L) end; mod_opt_type(hostname) -> fun iolist_to_binary/1; mod_opt_type(ip) -> fun (S) -> @@ -131,7 +133,7 @@ mod_opt_type(ram_db_type) -> mod_opt_type(Opt) -> case mod_proxy65_stream:listen_opt_type(Opt) of Opts when is_list(Opts) -> - [access, host, hostname, ip, name, port, + [access, host, hosts, hostname, ip, name, port, max_connections, ram_db_type] ++ Opts; Fun -> Fun |