Add host-meta
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Sam Therapy 2023-05-04 22:07:36 +02:00
parent 881643be84
commit 51ecfa9556
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

View file

@ -59,6 +59,12 @@ namespace BirdsiteLive.Controllers
return new JsonResult(nodeInfo);
}
[Route("/.well-known/host-meta")]
public IActionResult HostMeta()
{
return Content($"<?xml version=\"1.0\" encoding=\"UTF-8\"?><XRD xmlns=\"http://docs.oasis-open.org/ns/xri/xrd-1.0\"><Link rel=\"lrdd\" template=\"https://{_settings.Domain}/.well-known/webfinger?resource={{uri}}\" type=\"application/xrd+xml\" /></XRD>", "application/xrd+xml; charset=utf-8");
}
[Route("/nodeinfo/{id}.json")]
public async Task<IActionResult> NodeInfo(string id)
{