Matrix
federation fails because .well-known is
served with the incorrect CORS headers
When serving
the .well-known files for a Matrix
server with a 301 redirect, federation can fail
because the CORS headers have not been set. 1
To fix this, add the
Access-Control-Allow-Origin header to
the redirect response. For example, with an
.htaccess file: 1
Redirect 301 /.well-known https://matrix.example.com/.well-known
+Header always add Access-Control-Allow-Origin: "*"