Skip to content

Disable Mobile Client Requests to the Server Name

In some specific circumstances it may be desirable for clients to only contact Synapse directly at its public_baseurl (e.g. https://matrix.example.com), avoiding any requests to its server_name (e.g. example.com). In normal operation, Element Pro refreshes the https://<server_name>/.well-known/matrix/client file in the background to keep the rtc_foci value up to date. This can be disabled in your ESS Pro deployment by configuring the elementProConfig setting (ESS Pro 26.7.0 and later) or wellknownDelegation.additional.element (prior to ESS Pro 26.7.0):

elementProConfig: |
  {
    "disable_matrix_well_known_lookup_after_homeserver_discovery": true
  }

In the example above, setting the flag to true stops the automatic background updates.

Note: This setting doesn't have any impact during the sign-in flow, e.g. if the end user enters the server name as the account provider, then a request to https://<server_name>/.well-known/matrix/client will be made. To avoid this, the end users must enter public_baseurl (e.g. https://matrix.example.com) as the account provider instead. This applies regardless of whether the account provider is entered manually by the end user or supplied through Mobile Client Provisioning.

There is an example fragment in charts/matrix-stack/ci/fragments/element-pro-disable-matrix-well-known.yaml for further reference.