element-hq / element-hq/element-call
Question: Handling of trailing slash in /.well-known/matrix/client base_url
- Dominant language
- TypeScript
- Stars
- 996
- Forks
- 213
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 55
Description
Hello, I assume that this documentation is up to date: [extra_well_known_client_content](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#extra_well_known_client_content)
If I understand this correctly: According to this documentation, Synapse can dynamically deploy .well-known, but for me this only works with a manual Nginx configuration (Debian 12 test server, Nginx, Synapse 1.136.0 self-hosted with LiveKit via Docker).
however, If I configure this in homeserver.yaml, the Element-X (EX) call fails with: Error code: MISSING_MATRIX_RTC_FOCUS, even though the `.well-known/matrix/client` output looks fine. How do you handle this?
___
Details:
___
If I put this into homeserver.yaml (nginx variant removed):
```
public_baseurl: "https://domain.tld"
default_identity_server: "https://vector.im"
extra_well_known_client_content:
org.matrix.msc4143.rtc_foci:
- type: "livekit"
livekit_service_url: "https://rtc.domain.tld/livekit/jwt"
```
Verification looks OK:
```
curl -sSf https://domain.tld/.well-known/matrix/client | jq
{
"m.homeserver": {
"base_url": "https://domain.tld/"
},
"m.identity_server": {
"base_url": "https://vector.im"
},
"org.matrix.msc4143.rtc_foci": [
{
"type": "livekit",
"livekit_service_url": "https://rtc.domain.tld/livekit/jwt"
}
]
}
```
**But EX reports: Error code: MISSING_MATRIX_RTC_FOCUS**
___
If I configure nginx with:
`return 200 '{"m.homeserver":{"base_url":"https://domain.tld"},"m.identity_server":{"base_url":"https://vector.im"},"org.matrix.msc4143.rtc_foci":[{"type":"livekit","livekit_service_url":"https://rtc.domain.tld/livekit/jwt"}]}';`
**verification looks OK and it works fine with EX:**
```
curl -sSf https://domain.tld/.well-known/matrix/client | jq
{
"m.homeserver": {
"base_url": "https://domain.tld"
},
"m.identity_server": {
"base_url": "https://vector.im"
},
"org.matrix.msc4143.rtc_foci": [
{
"type": "livekit",
"livekit_service_url": "https://rtc.domain.tld/livekit/jwt"
}
]
}
```
___
What am I missing? I realized that when I configure homeserver.yaml for this, the `"base_url"` always includes a trailing slash (`"https://domain.tld/"`), even if I enter it without one. Maybe its a bug or am I on the wrong track?
___
**Expected Behavior**
according to https://spec.matrix.org/v1.16/client-server-api/#well-known-uris, clients should handle both cases (with and without a trailing slash)
**Actual Behavior**
Element-X shows an error when the value in `/.well-known/matrix/client` ends with `/`
**Related Issues**
Synapse: https://github.com/element-hq/synapse/issues/18859
Thank you for any information on this topic.
Contributor guide
Assessment
This issue has not been assessed yet.