Don't host /.well-known/element/element.json file when Element Call is enabled

Various old guides mention this, but it seems like neither Element Web,
nor Element Desktop make use of it.

Element Web & Element Desktop use their own `config.json` configuration to figure out where
Element Call is.
This commit is contained in:
Slavi Pantaleev
2025-03-17 17:09:56 +02:00
parent e3b4128278
commit a32eec757b
7 changed files with 6 additions and 134 deletions

View File

@ -72,21 +72,6 @@ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_cert
matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled: true
matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes: 100 # noqa var-naming
# Controls whether labels will be added that expose the `/.well-known/element` endpoint on the Matrix domain.
matrix_static_files_container_labels_well_known_element_endpoint_enabled: true
matrix_static_files_container_labels_well_known_element_endpoint_traefik_hostname: ''
matrix_static_files_container_labels_well_known_element_endpoint_traefik_path_prefix: /.well-known/element
matrix_static_files_container_labels_well_known_element_endpoint_traefik_rule: "Host(`{{ matrix_static_files_container_labels_well_known_element_endpoint_traefik_hostname }}`) && PathPrefix(`{{ matrix_static_files_container_labels_well_known_element_endpoint_traefik_path_prefix }}`)"
matrix_static_files_container_labels_well_known_element_endpoint_traefik_priority: 0
matrix_static_files_container_labels_well_known_element_endpoint_traefik_entrypoints: "{{ matrix_static_files_container_labels_traefik_entrypoints }}"
matrix_static_files_container_labels_well_known_element_endpoint_traefik_tls: "{{ matrix_static_files_container_labels_well_known_element_endpoint_traefik_entrypoints != 'web' }}"
matrix_static_files_container_labels_well_known_element_endpoint_traefik_tls_certResolver: "{{ matrix_static_files_container_labels_traefik_tls_certResolver }}" # noqa var-naming
# Controls whether the compress middleware (https://doc.traefik.io/traefik/middlewares/http/compress/) will be enabled for this router.
# The web-server only compresses known file types and our /.well-known/matrix/* files have no file extension.
# As such, they are not being compressed there and we compress them at the Traefik level.
matrix_static_files_container_labels_well_known_element_endpoint_middleware_compress_enabled: true
matrix_static_files_container_labels_well_known_element_endpoint_middleware_compress_minResponseBodyBytes: 100 # noqa var-naming
# Controls whether labels will be added that serve the base domain.
#
# This is similar to `matrix_static_files_container_labels_well_known_matrix_endpoint_*`, but does more.
@ -384,56 +369,6 @@ matrix_static_files_file_matrix_support_configuration: "{{ matrix_static_files_f
########################################################################
########################################################################
# #
# Related to /.well-known/element/element.json #
# #
########################################################################
# Controls whether a `/.well-known/element/element.json` file is generated and used at all.
matrix_static_files_file_element_element_json_enabled: true
# Controls the call.widget_url property in the /.well-known/element/element.json file
matrix_static_files_file_element_element_json_property_call_widget_url: ''
# Default /.well-known/element/element.json configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.
#
# For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_support_configuration_extension_json`)
# or completely replace this variable with your own template.
matrix_static_files_file_element_element_json_configuration_json: "{{ lookup('template', 'templates/public/.well-known/element/element.json.j2') }}"
# Your custom JSON configuration for /.well-known/element/element.json should go to `matrix_static_files_file_element_element_json_configuration_extension_json`.
# This configuration extends the default starting configuration (`matrix_static_files_file_matrix_support_configuration_extension_json`).
#
# You can override individual variables from the default configuration, or introduce new ones.
#
# If you need something more special, you can take full control by
# completely redefining `matrix_static_files_file_matrix_support_configuration_json`.
#
# Example configuration extension follows:
#
# matrix_static_files_file_element_element_json_configuration_extension_json: |
# {
# "call": {
# "url": "value"
# }
# }
matrix_static_files_file_element_element_json_configuration_extension_json: '{}'
matrix_static_files_file_element_element_json_configuration_extension: "{{ matrix_static_files_file_element_element_json_configuration_extension_json | from_json if matrix_static_files_file_element_element_json_configuration_extension_json | from_json is mapping else {} }}"
# Holds the final /.well-known/matrix/support configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_element_element_json_configuration_json` or `matrix_static_files_file_element_element_json_configuration_extension_json`.
matrix_static_files_file_element_element_json_configuration: "{{ matrix_static_files_file_element_element_json_configuration_json | combine(matrix_static_files_file_element_element_json_configuration_extension, recursive=True) }}"
########################################################################
# #
# /Related to /.well-known/element/element.json #
# #
########################################################################
########################################################################
# #
# Related to index.html #