Skip to content

Conversation

@derhagen
Copy link

@derhagen derhagen commented Jan 15, 2026

@derhagen derhagen changed the title Add MSC: Consistent redirects for .well-known-files MSC4402: Consistent redirects for .well-known-files Jan 15, 2026
@derhagen derhagen marked this pull request as ready for review January 15, 2026 16:02
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jan 15, 2026
Copy link
Member

@turt2live turt2live Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation requirements:

  • Web client (following redirect)
  • Native/non-web client (following redirect)
  • Server (issuing redirect on client API)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only thing that needs to be implemented is the Clients following redirects.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like me to include this in the MSC?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This thread is part of the MSC process rather than a suggestion. In order for the MSC to be considered for merging, appropriate implementations have to be linked in this comment thread (not in the markdown file)

I think in this case the first two bullets might have been a misinterpretation of the MSC though, because the MSC doesn't touch federation .well-known, it just references that as something which already supports redirects.

Copy link
Member

@tulir tulir Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the list to remove the server following redirect parts and split the client into two items, because web clients and native clients work fairly differently (web clients tend to always follow redirects, but all redirects must have CORS. Native clients may need to implement redirect following manually, but they don't care about CORS)

(also, implementations can just be confirming that something already works and perhaps pointing to the relevant existing code rather than writing new code)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, but you can even remove "Server (issuing redirect on client API)" I guess. In this scenario, the redirect would be set up manually by whoever has access to the webserver behind the base domain.

@turt2live turt2live added s2s Server-to-Server API (federation) client-server Client-Server API and removed client-server Client-Server API labels Jan 15, 2026
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't really read the MSC in too much detail, but "this is breaking" sounds scary 😬

This review is for an early pass of the checklist.

@derhagen
Copy link
Author

I haven't really read the MSC in too much detail, but "this is breaking" sounds scary 😬

Note that it only breaks backwards-compatibility for server-client interaction and only in settings where the admin explicitly chooses to make use of a well-known-redirect. Since the new wording is "Clients should follow 30x redirects", admins are made aware that a redirect might not work with all clients.

In enterprise settings, this doesn't matter, because a server admin mandates the client to use, anyway. Server admins who can't mandate the client need to wait with using redirects until this change has been broadly implemented.

@derhagen derhagen requested a review from turt2live January 16, 2026 11:23
Signed-off-by: Hagen Echzell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal s2s Server-to-Server API (federation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client/server discovery should support following 3xx redirects

4 participants