1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Router do
6 use Pleroma.Web, :router
9 plug(:accepts, ["html"])
15 plug(Pleroma.Plugs.OAuthPlug)
16 plug(Pleroma.Plugs.UserEnabledPlug)
20 plug(:accepts, ["json"])
22 plug(Pleroma.Plugs.OAuthPlug)
23 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
24 plug(Pleroma.Plugs.UserFetcherPlug)
25 plug(Pleroma.Plugs.SessionAuthenticationPlug)
26 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
27 plug(Pleroma.Plugs.AuthenticationPlug)
28 plug(Pleroma.Plugs.UserEnabledPlug)
29 plug(Pleroma.Plugs.SetUserSessionIdPlug)
30 plug(Pleroma.Plugs.EnsureUserKeyPlug)
31 plug(Pleroma.Plugs.IdempotencyPlug)
32 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
35 pipeline :authenticated_api do
36 plug(:accepts, ["json"])
38 plug(Pleroma.Plugs.OAuthPlug)
39 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
40 plug(Pleroma.Plugs.UserFetcherPlug)
41 plug(Pleroma.Plugs.SessionAuthenticationPlug)
42 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
43 plug(Pleroma.Plugs.AuthenticationPlug)
44 plug(Pleroma.Plugs.UserEnabledPlug)
45 plug(Pleroma.Plugs.SetUserSessionIdPlug)
46 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
47 plug(Pleroma.Plugs.IdempotencyPlug)
48 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
51 pipeline :admin_api do
52 plug(:accepts, ["json"])
54 plug(Pleroma.Plugs.OAuthPlug)
55 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
56 plug(Pleroma.Plugs.UserFetcherPlug)
57 plug(Pleroma.Plugs.SessionAuthenticationPlug)
58 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
59 plug(Pleroma.Plugs.AuthenticationPlug)
60 plug(Pleroma.Plugs.AdminSecretAuthenticationPlug)
61 plug(Pleroma.Plugs.UserEnabledPlug)
62 plug(Pleroma.Plugs.SetUserSessionIdPlug)
63 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
64 plug(Pleroma.Plugs.UserIsAdminPlug)
65 plug(Pleroma.Plugs.IdempotencyPlug)
66 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
69 pipeline :mastodon_html do
70 plug(:accepts, ["html"])
72 plug(Pleroma.Plugs.OAuthPlug)
73 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
74 plug(Pleroma.Plugs.UserFetcherPlug)
75 plug(Pleroma.Plugs.SessionAuthenticationPlug)
76 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
77 plug(Pleroma.Plugs.AuthenticationPlug)
78 plug(Pleroma.Plugs.UserEnabledPlug)
79 plug(Pleroma.Plugs.SetUserSessionIdPlug)
80 plug(Pleroma.Plugs.EnsureUserKeyPlug)
83 pipeline :pleroma_html do
84 plug(:accepts, ["html"])
86 plug(Pleroma.Plugs.OAuthPlug)
87 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
88 plug(Pleroma.Plugs.UserFetcherPlug)
89 plug(Pleroma.Plugs.SessionAuthenticationPlug)
90 plug(Pleroma.Plugs.AuthenticationPlug)
91 plug(Pleroma.Plugs.EnsureUserKeyPlug)
94 pipeline :well_known do
95 plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
99 plug(:accepts, ["json", "xml"])
100 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
103 pipeline :pleroma_api do
104 plug(:accepts, ["html", "json"])
105 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
108 pipeline :mailbox_preview do
109 plug(:accepts, ["html"])
111 plug(:put_secure_browser_headers, %{
112 "content-security-policy" =>
113 "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'"
117 pipeline :http_signature do
118 plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
119 plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
122 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
123 pipe_through(:pleroma_api)
125 get("/password_reset/:token", PasswordController, :reset, as: :reset_password)
126 post("/password_reset", PasswordController, :do_reset, as: :reset_password)
127 get("/emoji", UtilController, :emoji)
128 get("/captcha", UtilController, :captcha)
129 get("/healthcheck", UtilController, :healthcheck)
132 scope "/api/pleroma", Pleroma.Web do
133 pipe_through(:pleroma_api)
134 post("/uploader_callback/:upload_path", UploaderController, :callback)
137 scope "/api/pleroma/admin", Pleroma.Web.AdminAPI do
138 pipe_through(:admin_api)
140 post("/users/follow", AdminAPIController, :user_follow)
141 post("/users/unfollow", AdminAPIController, :user_unfollow)
143 delete("/users", AdminAPIController, :user_delete)
144 post("/users", AdminAPIController, :users_create)
145 patch("/users/:nickname/toggle_activation", AdminAPIController, :user_toggle_activation)
146 patch("/users/activate", AdminAPIController, :user_activate)
147 patch("/users/deactivate", AdminAPIController, :user_deactivate)
148 put("/users/tag", AdminAPIController, :tag_users)
149 delete("/users/tag", AdminAPIController, :untag_users)
151 get("/users/:nickname/permission_group", AdminAPIController, :right_get)
152 get("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_get)
154 post("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_add)
157 "/users/:nickname/permission_group/:permission_group",
162 post("/users/permission_group/:permission_group", AdminAPIController, :right_add_multiple)
165 "/users/permission_group/:permission_group",
167 :right_delete_multiple
170 get("/relay", AdminAPIController, :relay_list)
171 post("/relay", AdminAPIController, :relay_follow)
172 delete("/relay", AdminAPIController, :relay_unfollow)
174 post("/users/invite_token", AdminAPIController, :create_invite_token)
175 get("/users/invites", AdminAPIController, :invites)
176 post("/users/revoke_invite", AdminAPIController, :revoke_invite)
177 post("/users/email_invite", AdminAPIController, :email_invite)
179 get("/users/:nickname/password_reset", AdminAPIController, :get_password_reset)
180 patch("/users/force_password_reset", AdminAPIController, :force_password_reset)
181 get("/users/:nickname/credentials", AdminAPIController, :show_user_credentials)
182 patch("/users/:nickname/credentials", AdminAPIController, :update_user_credentials)
184 get("/users", AdminAPIController, :list_users)
185 get("/users/:nickname", AdminAPIController, :user_show)
186 get("/users/:nickname/statuses", AdminAPIController, :list_user_statuses)
188 get("/instances/:instance/statuses", AdminAPIController, :list_instance_statuses)
190 patch("/users/confirm_email", AdminAPIController, :confirm_email)
191 patch("/users/resend_confirmation_email", AdminAPIController, :resend_confirmation_email)
193 get("/reports", AdminAPIController, :list_reports)
194 get("/reports/:id", AdminAPIController, :report_show)
195 patch("/reports", AdminAPIController, :reports_update)
196 post("/reports/:id/notes", AdminAPIController, :report_notes_create)
197 delete("/reports/:report_id/notes/:id", AdminAPIController, :report_notes_delete)
199 put("/statuses/:id", AdminAPIController, :status_update)
200 delete("/statuses/:id", AdminAPIController, :status_delete)
201 get("/statuses", AdminAPIController, :list_statuses)
203 get("/config", AdminAPIController, :config_show)
204 post("/config", AdminAPIController, :config_update)
205 get("/config/descriptions", AdminAPIController, :config_descriptions)
206 get("/need_reboot", AdminAPIController, :need_reboot)
207 get("/restart", AdminAPIController, :restart)
209 get("/moderation_log", AdminAPIController, :list_log)
211 post("/reload_emoji", AdminAPIController, :reload_emoji)
212 get("/stats", AdminAPIController, :stats)
215 scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
218 pipe_through(:admin_api)
220 post("/import_from_fs", EmojiAPIController, :import_from_fs)
222 post("/:pack_name/update_file", EmojiAPIController, :update_file)
223 post("/:pack_name/update_metadata", EmojiAPIController, :update_metadata)
224 put("/:name", EmojiAPIController, :create)
225 delete("/:name", EmojiAPIController, :delete)
226 post("/download_from", EmojiAPIController, :download_from)
227 post("/list_from", EmojiAPIController, :list_from)
231 # Pack info / downloading
232 get("/", EmojiAPIController, :list_packs)
233 get("/:name/download_shared/", EmojiAPIController, :download_shared)
237 scope "/", Pleroma.Web.TwitterAPI do
238 pipe_through(:pleroma_html)
240 post("/main/ostatus", UtilController, :remote_subscribe)
241 get("/ostatus_subscribe", RemoteFollowController, :follow)
243 post("/ostatus_subscribe", RemoteFollowController, :do_follow)
246 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
247 pipe_through(:authenticated_api)
249 post("/change_email", UtilController, :change_email)
250 post("/change_password", UtilController, :change_password)
251 post("/delete_account", UtilController, :delete_account)
252 put("/notification_settings", UtilController, :update_notificaton_settings)
253 post("/disable_account", UtilController, :disable_account)
255 post("/blocks_import", UtilController, :blocks_import)
256 post("/follow_import", UtilController, :follow_import)
259 scope "/oauth", Pleroma.Web.OAuth do
262 get("/authorize", OAuthController, :authorize)
265 post("/authorize", OAuthController, :create_authorization)
266 post("/token", OAuthController, :token_exchange)
267 post("/revoke", OAuthController, :token_revoke)
268 get("/registration_details", OAuthController, :registration_details)
271 pipe_through(:browser)
273 get("/prepare_request", OAuthController, :prepare_request)
274 get("/:provider", OAuthController, :request)
275 get("/:provider/callback", OAuthController, :callback)
276 post("/register", OAuthController, :register)
280 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
283 get("/statuses/:id/reactions/:emoji", PleromaAPIController, :emoji_reactions_by)
284 get("/statuses/:id/reactions", PleromaAPIController, :emoji_reactions_by)
287 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
289 pipe_through(:authenticated_api)
291 get("/conversations/:id/statuses", PleromaAPIController, :conversation_statuses)
292 get("/conversations/:id", PleromaAPIController, :conversation)
293 post("/conversations/read", PleromaAPIController, :read_conversations)
297 pipe_through(:authenticated_api)
299 patch("/conversations/:id", PleromaAPIController, :update_conversation)
300 put("/statuses/:id/reactions/:emoji", PleromaAPIController, :react_with_emoji)
301 delete("/statuses/:id/reactions/:emoji", PleromaAPIController, :unreact_with_emoji)
302 post("/notifications/read", PleromaAPIController, :read_notification)
304 patch("/accounts/update_avatar", AccountController, :update_avatar)
305 patch("/accounts/update_banner", AccountController, :update_banner)
306 patch("/accounts/update_background", AccountController, :update_background)
308 get("/mascot", MascotController, :show)
309 put("/mascot", MascotController, :update)
311 post("/scrobble", ScrobbleController, :new_scrobble)
316 get("/accounts/:id/favourites", AccountController, :favourites)
320 pipe_through(:authenticated_api)
322 post("/accounts/:id/subscribe", AccountController, :subscribe)
323 post("/accounts/:id/unsubscribe", AccountController, :unsubscribe)
326 post("/accounts/confirmation_resend", AccountController, :confirmation_resend)
329 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
331 get("/accounts/:id/scrobbles", ScrobbleController, :user_scrobbles)
334 scope "/api/v1", Pleroma.Web.MastodonAPI do
335 pipe_through(:authenticated_api)
337 get("/accounts/verify_credentials", AccountController, :verify_credentials)
339 get("/accounts/relationships", AccountController, :relationships)
341 get("/accounts/:id/lists", AccountController, :lists)
342 get("/accounts/:id/identity_proofs", MastodonAPIController, :empty_array)
344 get("/follow_requests", FollowRequestController, :index)
345 get("/blocks", AccountController, :blocks)
346 get("/mutes", AccountController, :mutes)
348 get("/timelines/home", TimelineController, :home)
349 get("/timelines/direct", TimelineController, :direct)
351 get("/favourites", StatusController, :favourites)
352 get("/bookmarks", StatusController, :bookmarks)
354 get("/notifications", NotificationController, :index)
355 get("/notifications/:id", NotificationController, :show)
356 post("/notifications/:id/dismiss", NotificationController, :dismiss)
357 post("/notifications/clear", NotificationController, :clear)
358 delete("/notifications/destroy_multiple", NotificationController, :destroy_multiple)
359 # Deprecated: was removed in Mastodon v3, use `/notifications/:id/dismiss` instead
360 post("/notifications/dismiss", NotificationController, :dismiss)
362 get("/scheduled_statuses", ScheduledActivityController, :index)
363 get("/scheduled_statuses/:id", ScheduledActivityController, :show)
365 get("/lists", ListController, :index)
366 get("/lists/:id", ListController, :show)
367 get("/lists/:id/accounts", ListController, :list_accounts)
369 get("/domain_blocks", DomainBlockController, :index)
371 get("/filters", FilterController, :index)
373 get("/suggestions", SuggestionController, :index)
375 get("/conversations", ConversationController, :index)
376 post("/conversations/:id/read", ConversationController, :read)
378 get("/endorsements", AccountController, :endorsements)
380 patch("/accounts/update_credentials", AccountController, :update_credentials)
382 post("/statuses", StatusController, :create)
383 delete("/statuses/:id", StatusController, :delete)
385 post("/statuses/:id/reblog", StatusController, :reblog)
386 post("/statuses/:id/unreblog", StatusController, :unreblog)
387 post("/statuses/:id/favourite", StatusController, :favourite)
388 post("/statuses/:id/unfavourite", StatusController, :unfavourite)
389 post("/statuses/:id/pin", StatusController, :pin)
390 post("/statuses/:id/unpin", StatusController, :unpin)
391 post("/statuses/:id/bookmark", StatusController, :bookmark)
392 post("/statuses/:id/unbookmark", StatusController, :unbookmark)
393 post("/statuses/:id/mute", StatusController, :mute_conversation)
394 post("/statuses/:id/unmute", StatusController, :unmute_conversation)
396 put("/scheduled_statuses/:id", ScheduledActivityController, :update)
397 delete("/scheduled_statuses/:id", ScheduledActivityController, :delete)
399 post("/polls/:id/votes", PollController, :vote)
401 post("/media", MediaController, :create)
402 put("/media/:id", MediaController, :update)
404 delete("/lists/:id", ListController, :delete)
405 post("/lists", ListController, :create)
406 put("/lists/:id", ListController, :update)
408 post("/lists/:id/accounts", ListController, :add_to_list)
409 delete("/lists/:id/accounts", ListController, :remove_from_list)
411 post("/filters", FilterController, :create)
412 get("/filters/:id", FilterController, :show)
413 put("/filters/:id", FilterController, :update)
414 delete("/filters/:id", FilterController, :delete)
416 post("/reports", ReportController, :create)
418 post("/follows", AccountController, :follows)
419 post("/accounts/:id/follow", AccountController, :follow)
420 post("/accounts/:id/unfollow", AccountController, :unfollow)
421 post("/accounts/:id/block", AccountController, :block)
422 post("/accounts/:id/unblock", AccountController, :unblock)
423 post("/accounts/:id/mute", AccountController, :mute)
424 post("/accounts/:id/unmute", AccountController, :unmute)
426 post("/follow_requests/:id/authorize", FollowRequestController, :authorize)
427 post("/follow_requests/:id/reject", FollowRequestController, :reject)
429 post("/domain_blocks", DomainBlockController, :create)
430 delete("/domain_blocks", DomainBlockController, :delete)
432 post("/push/subscription", SubscriptionController, :create)
433 get("/push/subscription", SubscriptionController, :get)
434 put("/push/subscription", SubscriptionController, :update)
435 delete("/push/subscription", SubscriptionController, :delete)
437 get("/markers", MarkerController, :index)
438 post("/markers", MarkerController, :upsert)
441 scope "/api/web", Pleroma.Web do
442 pipe_through(:authenticated_api)
444 put("/settings", MastoFEController, :put_settings)
447 scope "/api/v1", Pleroma.Web.MastodonAPI do
450 post("/accounts", AccountController, :create)
451 get("/accounts/search", SearchController, :account_search)
453 get("/instance", InstanceController, :show)
454 get("/instance/peers", InstanceController, :peers)
456 post("/apps", AppController, :create)
457 get("/apps/verify_credentials", AppController, :verify_credentials)
459 get("/statuses/:id/card", StatusController, :card)
460 get("/statuses/:id/favourited_by", StatusController, :favourited_by)
461 get("/statuses/:id/reblogged_by", StatusController, :reblogged_by)
463 get("/custom_emojis", CustomEmojiController, :index)
465 get("/trends", MastodonAPIController, :empty_array)
467 get("/timelines/public", TimelineController, :public)
468 get("/timelines/tag/:tag", TimelineController, :hashtag)
469 get("/timelines/list/:list_id", TimelineController, :list)
471 get("/statuses", StatusController, :index)
472 get("/statuses/:id", StatusController, :show)
473 get("/statuses/:id/context", StatusController, :context)
475 get("/polls/:id", PollController, :show)
477 get("/accounts/:id/statuses", AccountController, :statuses)
478 get("/accounts/:id/followers", AccountController, :followers)
479 get("/accounts/:id/following", AccountController, :following)
480 get("/accounts/:id", AccountController, :show)
482 get("/search", SearchController, :search)
485 scope "/api/v2", Pleroma.Web.MastodonAPI do
487 get("/search", SearchController, :search2)
490 scope "/api", Pleroma.Web do
491 pipe_through(:config)
493 get("/help/test", TwitterAPI.UtilController, :help_test)
494 post("/help/test", TwitterAPI.UtilController, :help_test)
495 get("/statusnet/config", TwitterAPI.UtilController, :config)
496 get("/statusnet/version", TwitterAPI.UtilController, :version)
497 get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
500 scope "/api", Pleroma.Web do
504 "/account/confirm_email/:user_id/:token",
505 TwitterAPI.Controller,
514 get("/openapi", OpenApiSpex.Plug.RenderSpec, [])
517 scope "/api", Pleroma.Web, as: :authenticated_twitter_api do
518 pipe_through(:authenticated_api)
520 get("/oauth_tokens", TwitterAPI.Controller, :oauth_tokens)
521 delete("/oauth_tokens/:id", TwitterAPI.Controller, :revoke_token)
523 post("/qvitter/statuses/notifications/read", TwitterAPI.Controller, :notifications_read)
526 pipeline :ap_service_actor do
527 plug(:accepts, ["activity+json", "json"])
531 plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"])
532 plug(Pleroma.Plugs.StaticFEPlug)
536 plug(:accepts, ["json", "xml"])
539 scope "/", Pleroma.Web do
540 pipe_through(:ostatus)
541 pipe_through(:http_signature)
543 get("/objects/:uuid", OStatus.OStatusController, :object)
544 get("/activities/:uuid", OStatus.OStatusController, :activity)
545 get("/notice/:id", OStatus.OStatusController, :notice)
546 get("/notice/:id/embed_player", OStatus.OStatusController, :notice_player)
548 get("/users/:nickname/feed", Feed.UserController, :feed, as: :user_feed)
549 get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
551 get("/tags/:tag", Feed.TagController, :feed, as: :tag_feed)
554 scope "/", Pleroma.Web do
555 pipe_through(:browser)
556 get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
559 # Server to Server (S2S) AP interactions
560 pipeline :activitypub do
561 plug(:accepts, ["activity+json", "json"])
562 plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
563 plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
566 scope "/", Pleroma.Web.ActivityPub do
567 # XXX: not really ostatus
568 pipe_through(:ostatus)
570 get("/users/:nickname/outbox", ActivityPubController, :outbox)
573 # Client to Server (C2S) AP interactions
574 pipeline :activitypub_client do
575 plug(:accepts, ["activity+json", "json"])
577 plug(Pleroma.Plugs.OAuthPlug)
578 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
579 plug(Pleroma.Plugs.UserFetcherPlug)
580 plug(Pleroma.Plugs.SessionAuthenticationPlug)
581 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
582 plug(Pleroma.Plugs.AuthenticationPlug)
583 plug(Pleroma.Plugs.UserEnabledPlug)
584 plug(Pleroma.Plugs.SetUserSessionIdPlug)
585 plug(Pleroma.Plugs.EnsureUserKeyPlug)
588 scope "/", Pleroma.Web.ActivityPub do
589 pipe_through([:activitypub_client])
591 get("/api/ap/whoami", ActivityPubController, :whoami)
592 get("/users/:nickname/inbox", ActivityPubController, :read_inbox)
594 post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
595 post("/api/ap/upload_media", ActivityPubController, :upload_media)
597 get("/users/:nickname/followers", ActivityPubController, :followers)
598 get("/users/:nickname/following", ActivityPubController, :following)
601 scope "/", Pleroma.Web.ActivityPub do
602 pipe_through(:activitypub)
603 post("/inbox", ActivityPubController, :inbox)
604 post("/users/:nickname/inbox", ActivityPubController, :inbox)
607 scope "/relay", Pleroma.Web.ActivityPub do
608 pipe_through(:ap_service_actor)
610 get("/", ActivityPubController, :relay)
613 pipe_through(:http_signature)
614 post("/inbox", ActivityPubController, :inbox)
617 get("/following", ActivityPubController, :relay_following)
618 get("/followers", ActivityPubController, :relay_followers)
621 scope "/internal/fetch", Pleroma.Web.ActivityPub do
622 pipe_through(:ap_service_actor)
624 get("/", ActivityPubController, :internal_fetch)
625 post("/inbox", ActivityPubController, :inbox)
628 scope "/.well-known", Pleroma.Web do
629 pipe_through(:well_known)
631 get("/host-meta", WebFinger.WebFingerController, :host_meta)
632 get("/webfinger", WebFinger.WebFingerController, :webfinger)
633 get("/nodeinfo", Nodeinfo.NodeinfoController, :schemas)
636 scope "/nodeinfo", Pleroma.Web do
637 get("/:version", Nodeinfo.NodeinfoController, :nodeinfo)
640 scope "/", Pleroma.Web do
643 get("/web/manifest.json", MastoFEController, :manifest)
646 scope "/", Pleroma.Web do
647 pipe_through(:mastodon_html)
649 get("/web/login", MastodonAPI.AuthController, :login)
650 delete("/auth/sign_out", MastodonAPI.AuthController, :logout)
652 post("/auth/password", MastodonAPI.AuthController, :password_reset)
654 get("/web/*path", MastoFEController, :index)
657 pipeline :remote_media do
660 scope "/proxy/", Pleroma.Web.MediaProxy do
661 pipe_through(:remote_media)
663 get("/:sig/:url", MediaProxyController, :remote)
664 get("/:sig/:url/:filename", MediaProxyController, :remote)
667 if Pleroma.Config.get(:env) == :dev do
669 pipe_through([:mailbox_preview])
671 forward("/mailbox", Plug.Swoosh.MailboxPreview, base_path: "/dev/mailbox")
675 scope "/", Pleroma.Web.MongooseIM do
676 get("/user_exists", MongooseIMController, :user_exists)
677 get("/check_password", MongooseIMController, :check_password)
680 scope "/", Fallback do
681 get("/registration/:token", RedirectController, :registration_page)
682 get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
683 get("/api*path", RedirectController, :api_not_implemented)
684 get("/*path", RedirectController, :redirector)
686 options("/*path", RedirectController, :empty)