Skip to content

Commit a1efb78

Browse files
pviffxspantaleev
andauthored
Make logout_redirect_url configuration setting for Element Web configurable (#3903)
* Add logout_redirect_url var and option templating for matrix element client * Simplify logout_redirect_url templating and make it safer Using `to_json` to make it safer. Judging by the code here https://github.com/element-hq/element-web/blob/0b24d33c64e5a161621f68fa8da65aaa8d1c847d/src/Lifecycle.ts#L1026-L1032 it doesn't seem like it leaving `logout_redirect_url` empty will hurt, so this patch removes the `if` block. * Add comment for the `matrix_client_element_logout_redirect_url` variable --------- Co-authored-by: Slavi Pantaleev <[email protected]>
1 parent 6a07fb1 commit a1efb78

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

roles/custom/matrix-client-element/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,7 @@ matrix_client_element_location_sharing_map_style_content_sources_localsource_til
318318
# matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> contributors"
319319
# Leave blank, if map does not require attribution.
320320
matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: ""
321+
322+
# Optional URL to redirect the user to after they have logged out.
323+
# See https://github.com/element-hq/element-web/blob/develop/docs/config.md#sso-setup
324+
matrix_client_element_logout_redirect_url: ''

roles/custom/matrix-client-element/templates/config.json.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
{% if matrix_client_element_location_sharing_enabled %}
4141
"map_style_url": {{ matrix_client_element_map_style_url | to_json }},
4242
{% endif %}
43+
"logout_redirect_url": {{ matrix_client_element_logout_redirect_url | to_json }},
4344
"branding": {
4445
"auth_footer_links": {{ matrix_client_element_branding_auth_footer_links | to_json }},
4546
"auth_header_logo_url": {{ matrix_client_element_branding_auth_header_logo_url | to_json }},

0 commit comments

Comments
 (0)