Change structure
This commit is contained in:
parent
01c2c57933
commit
ddfb58c041
16 changed files with 153 additions and 66 deletions
18
lib/nulla_web/controllers/activitypub/hostmeta_controller.ex
Normal file
18
lib/nulla_web/controllers/activitypub/hostmeta_controller.ex
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue