-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mod_disco extra_domains config key
This option was used to make discoverable components that for a user might not have been discoverable given the domain was unrelated. This was so decided over a decade ago before MongooseIM 1.0.0, but I'd judge a better solution is to leave components as either entirely discoverable or entirely hidden by default, as components are usually dynamic and at the same time fully controllable at the deployment, and we can now have an infinite amount of domains for which a component can become a subdomain and hard-coding "extra_domains" for each static or dynamic domain is not feasible.
- Loading branch information
1 parent
d10da98
commit 9afc32c
Showing
6 changed files
with
7 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,6 @@ Implements [XEP-0030: Service Discovery](http://xmpp.org/extensions/xep-0030.htm | |
Strategy to handle incoming stanzas. For details, please refer to | ||
[IQ processing policies](../configuration/Modules.md#iq-processing-policies). | ||
|
||
### `modules.mod_disco.extra_domains` | ||
* **Syntax:** array of strings, valid domain names | ||
* **Default:** no extra domains | ||
* **Example:** `extra_domains = ["custom_domain"]` | ||
|
||
Adds domains that are not registered with other means to a local item announcement (response to `http://jabber.org/protocol/disco#items` IQ get). | ||
Please note that `mod_disco` doesn't verify these domains, so if no handlers are registered later for them, a client will receive a `service-unavailable` error for every stanza sent to one of these hosts. | ||
|
||
### `modules.mod_disco.server_info` | ||
* **Syntax:** array of tables described below | ||
* **Default:** no additional server info | ||
|
@@ -50,7 +42,6 @@ will still receive full disco results. | |
```toml | ||
[modules.mod_disco] | ||
iqdisc.type = "one_queue" | ||
extra_domains = ["some_domain", "another_domain"] | ||
server_info = [ | ||
{name = "abuse-address", urls = ["[email protected]"]}, | ||
{name = "friendly-spirits", urls = ["spirit1@localhost", "spirit2@localhost"], modules = ["mod_muc", "mod_disco"]} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -501,8 +501,7 @@ all_modules() -> | |
no_stanzaid_element => true}), | ||
mod_disco => | ||
mod_config(mod_disco, | ||
#{extra_domains => [<<"some_domain">>, <<"another_domain">>], | ||
server_info => | ||
#{server_info => | ||
[#{name => <<"abuse-address">>, | ||
urls => [<<"[email protected]">>]}, | ||
#{name => <<"friendly-spirits">>, | ||
|
@@ -885,8 +884,7 @@ default_mod_config(mod_csi) -> | |
default_mod_config(mod_carboncopy) -> | ||
#{iqdisc => no_queue}; | ||
default_mod_config(mod_disco) -> | ||
#{extra_domains => [], server_info => [], | ||
users_can_see_hidden_services => true, iqdisc => one_queue}; | ||
#{server_info => [], users_can_see_hidden_services => true, iqdisc => one_queue}; | ||
default_mod_config(mod_extdisco) -> | ||
#{iqdisc => no_queue, service => []}; | ||
default_mod_config(mod_global_distrib) -> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1565,11 +1565,6 @@ mod_disco(_Config) -> | |
T(<<"users_can_see_hidden_services">>, true)), | ||
?cfgh(P ++ [users_can_see_hidden_services], false, | ||
T(<<"users_can_see_hidden_services">>, false)), | ||
%% extra_domains are binaries | ||
?cfgh(P ++ [extra_domains], [<<"localhost">>, <<"erlang-solutions.com">>], | ||
T(<<"extra_domains">>, [<<"localhost">>, <<"erlang-solutions.com">>])), | ||
?cfgh(P ++ [extra_domains], [], | ||
T(<<"extra_domains">>, [])), | ||
Info = #{<<"name">> => <<"abuse-address">>, | ||
<<"urls">> => [<<"[email protected]">>]}, | ||
SpiritUrls = [<<"spirit1@localhost">>, <<"spirit2@localhost">>], | ||
|
@@ -1581,9 +1576,6 @@ mod_disco(_Config) -> | |
<<"modules">> => [<<"mod_muc">>, <<"mod_disco">>]}])), | ||
?errh(T(<<"users_can_see_hidden_services">>, 1)), | ||
?errh(T(<<"users_can_see_hidden_services">>, <<"true">>)), | ||
?errh(T(<<"extra_domains">>, [<<"user@localhost">>])), | ||
?errh(T(<<"extra_domains">>, [1])), | ||
?errh(T(<<"extra_domains">>, <<"domains domains domains">>)), | ||
?errh(T(<<"server_info">>, [Info#{<<"name">> => 1}])), | ||
?errh(T(<<"server_info">>, [Info#{<<"name">> => <<"">>}])), | ||
?errh(T(<<"server_info">>, [Info#{<<"modules">> => <<"roll">>}])), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,6 @@ | |
|
||
[modules.mod_disco] | ||
iqdisc.type = "one_queue" | ||
extra_domains = ["some_domain", "another_domain"] | ||
server_info = [ | ||
{name = "abuse-address", urls = ["[email protected]"]}, | ||
{name = "friendly-spirits", urls = ["spirit1@localhost", "spirit2@localhost"], modules = ["mod_muc", "mod_disco"]} | ||
|