From ea22acc89936add20dfd013305ab6dd36ad2301c Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 25 Jun 2024 10:55:08 +0300 Subject: [PATCH] Fix Hookshot URL path generation regression Regression since 78912688734589d67a9213201dbae45d231fad84, where I removed the `matrix_hookshot_urlprefix` prefix group `group_vars/matrix_servers`, thinking the value in `roles/custom/matrix-bridge-hookshot/defaults/main.yml` was the same. The value in `defaults/main.yml` incorrectly included `matrix_hookshot_public_endpoint` in `matrix_hookshot_urlprefix`, which was leading to double-`/hookshot`-prefixing. We were previously saved by the `matrix_hookshot_urlprefix` override in `group_vars/matrix_servers`. This fix brings the correct URL prefix value (the one without `matrix_hookshot_public_endpoint`) to `defaults/main.yml`. --- roles/custom/matrix-bridge-hookshot/defaults/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-bridge-hookshot/defaults/main.yml b/roles/custom/matrix-bridge-hookshot/defaults/main.yml index 8bd0a1b8b..8950be581 100644 --- a/roles/custom/matrix-bridge-hookshot/defaults/main.yml +++ b/roles/custom/matrix-bridge-hookshot/defaults/main.yml @@ -34,7 +34,11 @@ matrix_hookshot_public_scheme: https matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}" matrix_hookshot_public_endpoint: /hookshot -matrix_hookshot_urlprefix: "{{ matrix_hookshot_public_scheme }}://{{ matrix_hookshot_public_hostname }}{{ matrix_hookshot_public_endpoint }}" +# This is the base URL prefix shared among all endpoints. +# +# It intentionally does not include the path prefix (`matrix_hookshot_public_endpoint`), +# because of how it's used - it's concatenated with paths that already use matrix_hookshot_public_endpoint` within them. +matrix_hookshot_urlprefix: "{{ matrix_hookshot_public_scheme }}://{{ matrix_hookshot_public_hostname }}" # There is no need to edit ports. use matrix_hookshot_container_http_host_bind_ports below to expose ports instead. matrix_hookshot_appservice_port: 9993