Merge branch 'ostatus' of ssh.gitgud.io:lambadalambda/pleroma into ostatus

This commit is contained in:
Roger Braun 2017-04-20 10:16:41 +02:00
commit 5e7ceeba94
2 changed files with 13 additions and 0 deletions

View File

@ -9,6 +9,9 @@ defmodule Pleroma.Web.Endpoint do
# when deploying your static files in production.
plug Plug.Static,
at: "/media", from: "uploads", gzip: false
plug Plug.Static,
at: "/", from: :pleroma,
only: ~w(index.html static)
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.

View File

@ -71,4 +71,14 @@ defmodule Pleroma.Web.Router do
get "/host-meta", WebFinger.WebFingerController, :host_meta
get "/webfinger", WebFinger.WebFingerController, :webfinger
end
scope "/", Fallback do
get "/*path", RedirectController, :redirector
end
end
defmodule Fallback.RedirectController do
use Pleroma.Web, :controller
def redirector(conn, _params), do: send_file(conn, 200, "priv/static/index.html")
end