Change structure

This commit is contained in:
Mirai Kumiko 2025-07-01 10:15:06 +02:00
parent 01c2c57933
commit ddfb58c041
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
16 changed files with 153 additions and 66 deletions

View file

@ -0,0 +1,18 @@
defmodule NullaWeb.ActivityPub.HostmetaController do
use NullaWeb, :controller
def index(conn, _params) do
domain = NullaWeb.Endpoint.host()
xml = """
<?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link rel="lrdd" type="application/xrd+xml" template="https://#{domain}/.well-known/webfinger?resource={uri}"/>
</XRD>
"""
conn
|> put_resp_content_type("application/xrd+xml")
|> send_resp(200, xml)
end
end