Send frontend through phoenix.
This commit is contained in:
parent
d23f3e3cf3
commit
9167a2ebe3
|
@ -9,6 +9,9 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
# when deploying your static files in production.
|
# when deploying your static files in production.
|
||||||
plug Plug.Static,
|
plug Plug.Static,
|
||||||
at: "/media", from: "uploads", gzip: false
|
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 reloading can be explicitly enabled under the
|
||||||
# :code_reloader configuration of your endpoint.
|
# :code_reloader configuration of your endpoint.
|
||||||
|
|
|
@ -70,4 +70,14 @@ def user_fetcher(username) do
|
||||||
get "/host-meta", WebFinger.WebFingerController, :host_meta
|
get "/host-meta", WebFinger.WebFingerController, :host_meta
|
||||||
get "/webfinger", WebFinger.WebFingerController, :webfinger
|
get "/webfinger", WebFinger.WebFingerController, :webfinger
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue