mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-06-30 15:31:18 +00:00
mautrix-whatsapp: expose bridge HTTP API (for mautrix-manager and similar)
Auto-generate the provisioning shared secret (to enable the provisioning API), route the whole mautrix-whatsapp HTTP port via Traefik under `<matrix-fqn>/bridges/whatsapp`, and populate appservice.public_address, reusing the matrix_bridges_exposure_* mechanism. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,13 @@ matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
|
||||
matrix_mautrix_whatsapp_homeserver_async_media: false
|
||||
matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
|
||||
|
||||
# Scheme of the bridge's public address (see `matrix_mautrix_whatsapp_bridge_public_address`).
|
||||
matrix_mautrix_whatsapp_scheme: https
|
||||
|
||||
# The public base URL at which this bridge's HTTP API is reachable from outside (when exposed).
|
||||
# Used for the provisioning API's external-server (OpenID) flow and for public media links.
|
||||
matrix_mautrix_whatsapp_bridge_public_address: "{{ (matrix_mautrix_whatsapp_scheme + '://' + matrix_mautrix_whatsapp_exposure_hostname + matrix_mautrix_whatsapp_exposure_path_prefix) if matrix_mautrix_whatsapp_exposure_enabled else '' }}"
|
||||
|
||||
matrix_mautrix_whatsapp_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
|
||||
matrix_mautrix_whatsapp_self_sign_enabled: "{{ matrix_bridges_self_sign_enabled }}"
|
||||
|
||||
@@ -81,6 +88,15 @@ matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled:
|
||||
# See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
|
||||
matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: ''
|
||||
|
||||
# Controls whether labels will be added that expose mautrix-whatsapp's HTTP API
|
||||
# (used by tools like mautrix-manager for bridge login) at `https://<hostname><path_prefix>`.
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_enabled: "{{ matrix_mautrix_whatsapp_exposure_enabled }}"
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_traefik_rule: "Host(`{{ matrix_mautrix_whatsapp_exposure_hostname }}`) && PathPrefix(`{{ matrix_mautrix_whatsapp_exposure_path_prefix }}`)"
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_traefik_priority: 0
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_traefik_entrypoints: "{{ matrix_mautrix_whatsapp_container_labels_traefik_entrypoints }}"
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_traefik_tls: "{{ matrix_mautrix_whatsapp_container_labels_exposure_traefik_entrypoints != 'web' }}"
|
||||
matrix_mautrix_whatsapp_container_labels_exposure_traefik_tls_certResolver: "{{ matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
||||
|
||||
# matrix_mautrix_whatsapp_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
|
||||
# See `../templates/labels.j2` for details.
|
||||
#
|
||||
@@ -125,6 +141,11 @@ matrix_mautrix_whatsapp_metrics_proxying_enabled: false
|
||||
matrix_mautrix_whatsapp_metrics_proxying_hostname: ''
|
||||
matrix_mautrix_whatsapp_metrics_proxying_path_prefix: ''
|
||||
|
||||
# Controls whether mautrix-whatsapp's HTTP API is exposed publicly (used by tools like mautrix-manager for bridge login).
|
||||
matrix_mautrix_whatsapp_exposure_enabled: false
|
||||
matrix_mautrix_whatsapp_exposure_hostname: ''
|
||||
matrix_mautrix_whatsapp_exposure_path_prefix: ''
|
||||
|
||||
# Database-related configuration fields.
|
||||
#
|
||||
# To use SQLite, stick to these defaults.
|
||||
|
||||
Reference in New Issue
Block a user