mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Include a user agent in federation requests. (#7677)
This commit is contained in:
parent
a3f11567d9
commit
ac51bd581a
5 changed files with 43 additions and 4 deletions
|
@ -197,7 +197,14 @@ class MatrixFederationHttpClient(object):
|
|||
|
||||
self.reactor = Reactor()
|
||||
|
||||
self.agent = MatrixFederationAgent(self.reactor, tls_client_options_factory)
|
||||
user_agent = hs.version_string
|
||||
if hs.config.user_agent_suffix:
|
||||
user_agent = "%s %s" % (user_agent, hs.config.user_agent_suffix)
|
||||
user_agent = user_agent.encode("ascii")
|
||||
|
||||
self.agent = MatrixFederationAgent(
|
||||
self.reactor, tls_client_options_factory, user_agent
|
||||
)
|
||||
|
||||
# Use a BlacklistingAgentWrapper to prevent circumventing the IP
|
||||
# blacklist via IP literals in server names
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue