瀏覽代碼

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

tags/v0.9.9
Roger Braun 7 年之前
父節點
當前提交
5e7ceeba94
共有 2 個文件被更改,包括 13 次插入0 次删除
  1. +3
    -0
      lib/pleroma/web/endpoint.ex
  2. +10
    -0
      lib/pleroma/web/router.ex

+ 3
- 0
lib/pleroma/web/endpoint.ex 查看文件

@@ -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.


+ 10
- 0
lib/pleroma/web/router.ex 查看文件

@@ -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

Loading…
取消
儲存