element-hq / element-hq/synapse
serve_server_wellknown should respect public_baseurl
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#14355](https://github.com/matrix-org/synapse/issues/14355).
---
**Description:**
If a server admin configures `serve_server_wellknown: true`, the response for `/.well-known/matrix/server` points other servers to `server_name:443` regardless of the value of `public_baseurl`. This breaks federation if Synapse is hosted on a dedicated subdomain and the admin reverse proxies `https://server_name/.well-known/matrix/` back to Synapse.
Contributor guide
Research direction
Start by tracing the serve_server_wellknown configuration and the handler for /.well-known/matrix/server. Compare the response URL with public_baseurl, then verify that the generated server address supports federation when Synapse is reverse-proxied from a dedicated subdomain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100