Bladeren bron

matrix-bot-maubot: avoid double slash in base paths when path_prefix is /

The derived `*_base_path` defaults concatenated `matrix_bot_maubot_path_prefix`
directly, producing `//v1` and `//plugin/` when users set the documented
`matrix_bot_maubot_path_prefix: /` (for serving on a dedicated subdomain),
which Traefik rejects. Apply the standard `'/' == path_prefix` guard already
used by other roles (honoroit, mautrix-discord, MAS, heisenbridge, etc.).

Reported by The Dark Wizard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pull/5259/head
Slavi Pantaleev 2 dagen geleden
bovenliggende
commit
8751e34ede
1 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  1. +5
    -2
      roles/custom/matrix-bot-maubot/defaults/main.yml

+ 5
- 2
roles/custom/matrix-bot-maubot/defaults/main.yml Bestand weergeven

@@ -23,6 +23,9 @@ matrix_bot_maubot_initial_password: ''

matrix_bot_maubot_scheme: https
matrix_bot_maubot_hostname: ''

# The path at which maubot is exposed.
# This value must either be `/` or not end with a slash (e.g. `/_matrix/maubot`).
matrix_bot_maubot_path_prefix: /_matrix/maubot

matrix_bot_maubot_container_image_self_build: false
@@ -58,9 +61,9 @@ matrix_bot_maubot_container_src_files_path: "{{ matrix_bot_maubot_base_path }}/d
matrix_bot_maubot_customized_container_src_files_path: "{{ matrix_bot_maubot_base_path }}/customized-docker-src"

matrix_bot_maubot_bot_server_public_url: "{{ matrix_bot_maubot_scheme }}://{{ matrix_bot_maubot_hostname }}"
matrix_bot_maubot_bot_server_base_path: "{{ matrix_bot_maubot_path_prefix }}/v1"
matrix_bot_maubot_bot_server_base_path: "{{ '' if matrix_bot_maubot_path_prefix == '/' else matrix_bot_maubot_path_prefix }}/v1"
matrix_bot_maubot_bot_server_ui_base_path: "{{ matrix_bot_maubot_path_prefix }}"
matrix_bot_maubot_bot_server_plugin_base_path: "{{ matrix_bot_maubot_path_prefix }}/plugin/"
matrix_bot_maubot_bot_server_plugin_base_path: "{{ '' if matrix_bot_maubot_path_prefix == '/' else matrix_bot_maubot_path_prefix }}/plugin/"
matrix_bot_maubot_bot_server_appservice_base_path: "{{ matrix_bot_maubot_bot_server_base_path }}"

matrix_bot_maubot_proxy_management_interface: true


Laden…
Annuleren
Opslaan