element-hq / element-hq/synapse

serve_server_wellknown should respect public_baseurl

Open
#14,355 4 comments 2 reactions 0 assignees View on GitHub
A-Federation O-Occasional S-Minor T-Enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.