~afontaine/home

ref: e089abae5bc1bf9268e30b0256ed288ae1dbadf0 home/apps/home_web/lib/home_web/controllers/well_known_controller.ex -rw-r--r-- 337 bytes
e089abaeAndrew Fontaine Add Well Known Controller for .well-known Requests 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
defmodule HomeWeb.WellKnownController do
  use HomeWeb, :controller

  def index(conn, %{"path" => "stellar.toml"}) do
    text(conn, "FEDERATION_SERVER=\"https://stellarid.io/federation/\"")
  end

  def index(conn, _),
    do:
      conn
      |> put_status(:not_found)
      |> put_view(HomeWeb.ErrorView)
      |> render(:"404")
end