Add basic webfinger.

This commit is contained in:
Roger Braun 2017-04-17 13:44:41 +02:00
commit ce6cc84a4a
8 changed files with 195 additions and 4 deletions

View file

@ -61,12 +61,17 @@ defmodule Pleroma.Web do
apply(__MODULE__, which, [])
end
def host do
settings = Application.get_env(:pleroma, Pleroma.Web.Endpoint)
settings
|> Keyword.fetch!(:url)
|> Keyword.fetch!(:host)
end
def base_url do
settings = Application.get_env(:pleroma, Pleroma.Web.Endpoint)
host =
settings
|> Keyword.fetch!(:url)
|> Keyword.fetch!(:host)
host = host()
protocol = settings |> Keyword.fetch!(:protocol)