mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Better web-handlers detection
This commit is contained in:
parent
ae4356265f
commit
7fd91a4b12
@ -114,23 +114,23 @@ init({SockMod, Socket}, Opts) ->
|
|||||||
inet:setopts(Socket1, [{packet, http_bin}, {recbuf, 8192}]);
|
inet:setopts(Socket1, [{packet, http_bin}, {recbuf, 8192}]);
|
||||||
_ -> ok
|
_ -> ok
|
||||||
end,
|
end,
|
||||||
Captcha = case lists:member(captcha, Opts) of
|
Captcha = case proplists:get_bool(captcha, Opts) of
|
||||||
true -> [{[<<"captcha">>], ejabberd_captcha}];
|
true -> [{[<<"captcha">>], ejabberd_captcha}];
|
||||||
false -> []
|
false -> []
|
||||||
end,
|
end,
|
||||||
Register = case lists:member(register, Opts) of
|
Register = case proplists:get_bool(register, Opts) of
|
||||||
true -> [{[<<"register">>], mod_register_web}];
|
true -> [{[<<"register">>], mod_register_web}];
|
||||||
false -> []
|
false -> []
|
||||||
end,
|
end,
|
||||||
Admin = case lists:member(web_admin, Opts) of
|
Admin = case proplists:get_bool(web_admin, Opts) of
|
||||||
true -> [{[<<"admin">>], ejabberd_web_admin}];
|
true -> [{[<<"admin">>], ejabberd_web_admin}];
|
||||||
false -> []
|
false -> []
|
||||||
end,
|
end,
|
||||||
Bind = case lists:member(http_bind, Opts) of
|
Bind = case proplists:get_bool(http_bind, Opts) of
|
||||||
true -> [{[<<"http-bind">>], mod_http_bind}];
|
true -> [{[<<"http-bind">>], mod_http_bind}];
|
||||||
false -> []
|
false -> []
|
||||||
end,
|
end,
|
||||||
Poll = case lists:member(http_poll, Opts) of
|
Poll = case proplists:get_bool(http_poll, Opts) of
|
||||||
true -> [{[<<"http-poll">>], ejabberd_http_poll}];
|
true -> [{[<<"http-poll">>], ejabberd_http_poll}];
|
||||||
false -> []
|
false -> []
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user