summary refs log tree commit diff
path: root/MxApiExtensions/Controllers/Other/WellKnownController.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-11-05 17:59:38 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-11-05 17:59:38 +0100
commit2abb132234546e61bb0aff3897dc49e72ea84f5d (patch)
treec885c03d35e7a0a6b8fc21bd0b259216c61c877c /MxApiExtensions/Controllers/Other/WellKnownController.cs
parentUpdate (diff)
downloadMxApiExtensions-2abb132234546e61bb0aff3897dc49e72ea84f5d.tar.xz
Working sync proxy
Diffstat (limited to 'MxApiExtensions/Controllers/Other/WellKnownController.cs')
-rw-r--r--MxApiExtensions/Controllers/Other/WellKnownController.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/MxApiExtensions/Controllers/Other/WellKnownController.cs b/MxApiExtensions/Controllers/Other/WellKnownController.cs
new file mode 100644

index 0000000..c0e255f --- /dev/null +++ b/MxApiExtensions/Controllers/Other/WellKnownController.cs
@@ -0,0 +1,19 @@ +using System.Text.Json.Nodes; +using Microsoft.AspNetCore.Mvc; + +namespace MxApiExtensions.Controllers; + +[ApiController] +[Route("/")] +public class WellKnownController(MxApiExtensionsConfiguration config) : ControllerBase { + private readonly MxApiExtensionsConfiguration _config = config; + + [HttpGet("/.well-known/matrix/client")] + public object GetWellKnown() { + var res = new JsonObject(); + res.Add("m.homeserver", new JsonObject { + { "base_url", Request.Scheme + "://" + Request.Host }, + }); + return res; + } +}