-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Changed handling of web_client_location
conflicts with recommended reverse proxy setup
#14722
Comments
I'm a bit confused -- can you more concretely provide what you're using as the config for Honestly hosting your web-client at the same domain as your Matrix server is usually not considered a good idea due to cookie sharing between domains. |
Thank you for your quick response! I use it in the way it is described in the documentation:
(i.e. the web client runs somewhere else - but the API endpoint provides a way to find it) For the reference: I noticed this problem in our grouprise setup. (in case you are interested in the use-case of discovering the web client of a Matrix user) |
In issue matrix-org#11895, the redirect from /_matrix/client to the URL configured in web_client_location was moved to the root URL (/). This change requires local administrators to update their proxy setups to include the root URL, as the current recommendations only include proxies for /_matrix/ and /_synapse/client/. This is necessary for the new location of the redirect to be effective. This issue was raised in matrix-org#14722 by @sumpfralle
I was going to review #14739 and to be honest, I'm a little bit confused here. I would have thought the purpose of Synapse redirecting I really don't think it's intended to be a necessary feature and I would hesitate encouraging people to route |
Thanks to @ankit-pn for preparing #14739 and to @reivilibre for initiating the discussion. In my initial post I suggested two ways for solving the issue. Based on your input, I would add another one (C).
Based on @reivilibre's comment, I guess, that (A) is out of question. Since the Personally I would prefer (B), since it would work right now and thus, I could avoid maintaining manual mappings between Matrix homeservers and the locations of their public web clients. What do you think? |
When a user clicks on a chat room link, we reply with a redirect to the user's web client. Somewhen around matrix-synapse v1.50 the path `/_matrix/client` stopped returning a redirect to the site-local web client. Thus we maintain a manual list of Matrix web clients until either MSC2312 [1] is supported or a suitable redirect is published again (see [2]). See #793 [1] matrix-org/matrix-spec-proposals#2312 [2] matrix-org/synapse#14722
Description
In #11895 the redirect from
/_matrix/client
to the URL configured inweb_client_location
was moved to/
.In order to make this new location effective, the local administrator needs to adjust the currently recommended proxy setups, since these include only
/_matrix/
and/_synapse/client/
.For example, the nginx setup would need to change in a single line:
But the above change can be tricky for many site operators, since the
/
path may conflict with their regular (non-matrix) web services.I conducted a quick survey of the servers listed at https://joinmatrix.org/ for their usage of the
web_location_location
feature (based on 91 matrix server entries; see the small shell script at the end of this issue):unkown
) do not offer discovery via the.well-known/matrix/client
endpoint (just ignore them)local
) return a redirect to a relative destination path (probably not related to a Matrix web client)missing
) do not return a redirect (probably this is just a regular web site - not related to Matrix)misleading
) return an absolute redirect to a regular web site (probably not related to Matrix)I understand the results as follows:
/
path for non-Matrix content/
path for redirecting to a Matrix web clientFrom my point of view there are two options for proceeding:
/
endpoint and update the reverse proxy documentation for this new path to be handed over to matrix-synapse/_matrix/
(maybe even back to/_matrix/client
) in order to simplify the setup for site operators, which serve regular content below their configuredbase_url
Personally, I was mislead to using a regular (content)
base_url
for the dozen of Matrix homeservers, I administer. This was based on the neat reverse proxy setup, which clearly separated the Matrix content (/_matrix/
) from the remaining content. Now I face the option of either changing thebase_url
and re-arrange the proxy setups or just miss out this nice discovery feature. Thus, I would prefer option (B).For reference: I used the following quick approach for testing the Matrix servers published on joinmatrix.org:
Steps to reproduce
/
in the reverse proxy configurationHomeserver
matrix.org
Synapse Version
1.74.0
Installation Method
I don't know
Database
irrelevant
Workers
Single process
Platform
irrelevant
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: