Skip to content

Commit

Permalink
Make logout_redirect_url configuration setting for Element Web conf…
Browse files Browse the repository at this point in the history
…igurable (#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]>
  • Loading branch information
pviffx and spantaleev authored Dec 23, 2024
1 parent 6a07fb1 commit a1efb78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/custom/matrix-client-element/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,7 @@ matrix_client_element_location_sharing_map_style_content_sources_localsource_til
# matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> contributors"
# Leave blank, if map does not require attribution.
matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: ""

# Optional URL to redirect the user to after they have logged out.
# See https://github.com/element-hq/element-web/blob/develop/docs/config.md#sso-setup
matrix_client_element_logout_redirect_url: ''
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
{% if matrix_client_element_location_sharing_enabled %}
"map_style_url": {{ matrix_client_element_map_style_url | to_json }},
{% endif %}
"logout_redirect_url": {{ matrix_client_element_logout_redirect_url | to_json }},
"branding": {
"auth_footer_links": {{ matrix_client_element_branding_auth_footer_links | to_json }},
"auth_header_logo_url": {{ matrix_client_element_branding_auth_header_logo_url | to_json }},
Expand Down

0 comments on commit a1efb78

Please sign in to comment.