Add Mastodon frontend.
This commit is contained in:
parent
414c52509b
commit
d293ceb1b5
170 changed files with 206601 additions and 5 deletions
|
|
@ -21,6 +21,13 @@ defmodule Pleroma.Web.Router do
|
|||
plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1}
|
||||
end
|
||||
|
||||
pipeline :mastodon_html do
|
||||
plug :accepts, ["html"]
|
||||
plug :fetch_session
|
||||
plug Pleroma.Plugs.OAuthPlug
|
||||
plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1, optional: true}
|
||||
end
|
||||
|
||||
pipeline :well_known do
|
||||
plug :accepts, ["xml", "xrd+xml"]
|
||||
end
|
||||
|
|
@ -207,6 +214,14 @@ defmodule Pleroma.Web.Router do
|
|||
get "/webfinger", WebFinger.WebFingerController, :webfinger
|
||||
end
|
||||
|
||||
scope "/web", Pleroma.Web.MastodonAPI do
|
||||
pipe_through :mastodon_html
|
||||
|
||||
get "/login", MastodonAPIController, :login
|
||||
post "/login", MastodonAPIController, :login_post
|
||||
get "/*path", MastodonAPIController, :index
|
||||
end
|
||||
|
||||
scope "/", Fallback do
|
||||
get "/*path", RedirectController, :redirector
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue