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)
19 pipeline :expect_authentication do
20 plug(Pleroma.Plugs.ExpectAuthenticatedCheckPlug)
23 pipeline :expect_public_instance_or_authentication do
24 plug(Pleroma.Plugs.ExpectPublicOrAuthenticatedCheckPlug)
27 pipeline :authenticate do
28 plug(Pleroma.Plugs.OAuthPlug)
29 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
30 plug(Pleroma.Plugs.UserFetcherPlug)
31 plug(Pleroma.Plugs.SessionAuthenticationPlug)
32 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
33 plug(Pleroma.Plugs.AuthenticationPlug)
36 pipeline :after_auth do
37 plug(Pleroma.Plugs.UserEnabledPlug)
38 plug(Pleroma.Plugs.SetUserSessionIdPlug)
39 plug(Pleroma.Plugs.EnsureUserKeyPlug)
43 plug(:accepts, ["json"])
46 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
50 plug(:expect_public_instance_or_authentication)
53 plug(Pleroma.Plugs.IdempotencyPlug)
56 pipeline :authenticated_api do
57 plug(:expect_authentication)
60 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
61 plug(Pleroma.Plugs.IdempotencyPlug)
64 pipeline :admin_api do
65 plug(:expect_authentication)
67 plug(Pleroma.Plugs.AdminSecretAuthenticationPlug)
69 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
70 plug(Pleroma.Plugs.UserIsAdminPlug)
71 plug(Pleroma.Plugs.IdempotencyPlug)
74 pipeline :mastodon_html do
80 pipeline :pleroma_html do
83 plug(Pleroma.Plugs.EnsureUserKeyPlug)
86 pipeline :well_known do
87 plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
91 plug(:accepts, ["json", "xml"])
92 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
95 pipeline :pleroma_api do
96 plug(:accepts, ["html", "json"])
97 plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
100 pipeline :mailbox_preview do
101 plug(:accepts, ["html"])
103 plug(:put_secure_browser_headers, %{
104 "content-security-policy" =>
105 "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'"
109 pipeline :http_signature do
110 plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
111 plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
114 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
115 pipe_through(:pleroma_api)
117 get("/password_reset/:token", PasswordController, :reset, as: :reset_password)
118 post("/password_reset", PasswordController, :do_reset, as: :reset_password)
119 get("/emoji", UtilController, :emoji)
120 get("/captcha", UtilController, :captcha)
121 get("/healthcheck", UtilController, :healthcheck)
124 scope "/api/pleroma", Pleroma.Web do
125 pipe_through(:pleroma_api)
126 post("/uploader_callback/:upload_path", UploaderController, :callback)
129 scope "/api/pleroma/admin", Pleroma.Web.AdminAPI do
130 pipe_through(:admin_api)
132 post("/users/follow", AdminAPIController, :user_follow)
133 post("/users/unfollow", AdminAPIController, :user_unfollow)
135 delete("/users", AdminAPIController, :user_delete)
136 post("/users", AdminAPIController, :users_create)
137 patch("/users/:nickname/toggle_activation", AdminAPIController, :user_toggle_activation)
138 patch("/users/activate", AdminAPIController, :user_activate)
139 patch("/users/deactivate", AdminAPIController, :user_deactivate)
140 put("/users/tag", AdminAPIController, :tag_users)
141 delete("/users/tag", AdminAPIController, :untag_users)
143 get("/users/:nickname/permission_group", AdminAPIController, :right_get)
144 get("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_get)
146 post("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_add)
149 "/users/:nickname/permission_group/:permission_group",
154 post("/users/permission_group/:permission_group", AdminAPIController, :right_add_multiple)
157 "/users/permission_group/:permission_group",
159 :right_delete_multiple
162 get("/relay", AdminAPIController, :relay_list)
163 post("/relay", AdminAPIController, :relay_follow)
164 delete("/relay", AdminAPIController, :relay_unfollow)
166 post("/users/invite_token", AdminAPIController, :create_invite_token)
167 get("/users/invites", AdminAPIController, :invites)
168 post("/users/revoke_invite", AdminAPIController, :revoke_invite)
169 post("/users/email_invite", AdminAPIController, :email_invite)
171 get("/users/:nickname/password_reset", AdminAPIController, :get_password_reset)
172 patch("/users/force_password_reset", AdminAPIController, :force_password_reset)
173 get("/users/:nickname/credentials", AdminAPIController, :show_user_credentials)
174 patch("/users/:nickname/credentials", AdminAPIController, :update_user_credentials)
176 get("/users", AdminAPIController, :list_users)
177 get("/users/:nickname", AdminAPIController, :user_show)
178 get("/users/:nickname/statuses", AdminAPIController, :list_user_statuses)
180 get("/instances/:instance/statuses", AdminAPIController, :list_instance_statuses)
182 patch("/users/confirm_email", AdminAPIController, :confirm_email)
183 patch("/users/resend_confirmation_email", AdminAPIController, :resend_confirmation_email)
185 get("/reports", AdminAPIController, :list_reports)
186 get("/reports/:id", AdminAPIController, :report_show)
187 patch("/reports", AdminAPIController, :reports_update)
188 post("/reports/:id/notes", AdminAPIController, :report_notes_create)
189 delete("/reports/:report_id/notes/:id", AdminAPIController, :report_notes_delete)
191 get("/statuses/:id", AdminAPIController, :status_show)
192 put("/statuses/:id", AdminAPIController, :status_update)
193 delete("/statuses/:id", AdminAPIController, :status_delete)
194 get("/statuses", AdminAPIController, :list_statuses)
196 get("/config", AdminAPIController, :config_show)
197 post("/config", AdminAPIController, :config_update)
198 get("/config/descriptions", AdminAPIController, :config_descriptions)
199 get("/need_reboot", AdminAPIController, :need_reboot)
200 get("/restart", AdminAPIController, :restart)
202 get("/moderation_log", AdminAPIController, :list_log)
204 post("/reload_emoji", AdminAPIController, :reload_emoji)
205 get("/stats", AdminAPIController, :stats)
207 get("/oauth_app", AdminAPIController, :oauth_app_list)
208 post("/oauth_app", AdminAPIController, :oauth_app_create)
209 patch("/oauth_app/:id", AdminAPIController, :oauth_app_update)
210 delete("/oauth_app/:id", AdminAPIController, :oauth_app_delete)
213 scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
216 pipe_through(:admin_api)
218 get("/import", EmojiAPIController, :import_from_filesystem)
219 get("/remote", EmojiAPIController, :remote)
220 post("/download", EmojiAPIController, :download)
222 post("/:name", EmojiAPIController, :create)
223 patch("/:name", EmojiAPIController, :update)
224 delete("/:name", EmojiAPIController, :delete)
226 post("/:name/files", EmojiAPIController, :add_file)
227 patch("/:name/files", EmojiAPIController, :update_file)
228 delete("/:name/files", EmojiAPIController, :delete_file)
231 # Pack info / downloading
233 get("/", EmojiAPIController, :list)
234 get("/:name", EmojiAPIController, :show)
235 get("/:name/archive", EmojiAPIController, :archive)
239 scope "/", Pleroma.Web.TwitterAPI do
240 pipe_through(:pleroma_html)
242 post("/main/ostatus", UtilController, :remote_subscribe)
243 get("/ostatus_subscribe", RemoteFollowController, :follow)
245 post("/ostatus_subscribe", RemoteFollowController, :do_follow)
248 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
249 pipe_through(:authenticated_api)
251 post("/change_email", UtilController, :change_email)
252 post("/change_password", UtilController, :change_password)
253 post("/delete_account", UtilController, :delete_account)
254 put("/notification_settings", UtilController, :update_notificaton_settings)
255 post("/disable_account", UtilController, :disable_account)
257 post("/blocks_import", UtilController, :blocks_import)
258 post("/follow_import", UtilController, :follow_import)
261 scope "/oauth", Pleroma.Web.OAuth do
264 get("/authorize", OAuthController, :authorize)
267 post("/authorize", OAuthController, :create_authorization)
268 post("/token", OAuthController, :token_exchange)
269 post("/revoke", OAuthController, :token_revoke)
270 get("/registration_details", OAuthController, :registration_details)
273 pipe_through(:browser)
275 get("/prepare_request", OAuthController, :prepare_request)
276 get("/:provider", OAuthController, :request)
277 get("/:provider/callback", OAuthController, :callback)
278 post("/register", OAuthController, :register)
282 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
285 get("/statuses/:id/reactions/:emoji", PleromaAPIController, :emoji_reactions_by)
286 get("/statuses/:id/reactions", PleromaAPIController, :emoji_reactions_by)
289 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
291 pipe_through(:authenticated_api)
293 post("/chats/by-account-id/:id", ChatController, :create)
294 get("/chats", ChatController, :index)
295 get("/chats/:id/messages", ChatController, :messages)
296 post("/chats/:id/messages", ChatController, :post_chat_message)
297 post("/chats/:id/read", ChatController, :mark_as_read)
301 pipe_through(:authenticated_api)
303 get("/conversations/:id/statuses", PleromaAPIController, :conversation_statuses)
304 get("/conversations/:id", PleromaAPIController, :conversation)
305 post("/conversations/read", PleromaAPIController, :mark_conversations_as_read)
309 pipe_through(:authenticated_api)
311 patch("/conversations/:id", PleromaAPIController, :update_conversation)
312 put("/statuses/:id/reactions/:emoji", PleromaAPIController, :react_with_emoji)
313 delete("/statuses/:id/reactions/:emoji", PleromaAPIController, :unreact_with_emoji)
314 post("/notifications/read", PleromaAPIController, :mark_notifications_as_read)
316 patch("/accounts/update_avatar", AccountController, :update_avatar)
317 patch("/accounts/update_banner", AccountController, :update_banner)
318 patch("/accounts/update_background", AccountController, :update_background)
320 get("/mascot", MascotController, :show)
321 put("/mascot", MascotController, :update)
323 post("/scrobble", ScrobbleController, :new_scrobble)
328 get("/accounts/:id/favourites", AccountController, :favourites)
332 pipe_through(:authenticated_api)
334 post("/accounts/:id/subscribe", AccountController, :subscribe)
335 post("/accounts/:id/unsubscribe", AccountController, :unsubscribe)
338 post("/accounts/confirmation_resend", AccountController, :confirmation_resend)
341 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
343 get("/accounts/:id/scrobbles", ScrobbleController, :user_scrobbles)
346 scope "/api/v1", Pleroma.Web.MastodonAPI do
347 pipe_through(:authenticated_api)
349 get("/accounts/verify_credentials", AccountController, :verify_credentials)
350 patch("/accounts/update_credentials", AccountController, :update_credentials)
352 get("/accounts/relationships", AccountController, :relationships)
353 get("/accounts/:id/lists", AccountController, :lists)
354 get("/accounts/:id/identity_proofs", AccountController, :identity_proofs)
355 get("/endorsements", AccountController, :endorsements)
356 get("/blocks", AccountController, :blocks)
357 get("/mutes", AccountController, :mutes)
359 post("/follows", AccountController, :follow_by_uri)
360 post("/accounts/:id/follow", AccountController, :follow)
361 post("/accounts/:id/unfollow", AccountController, :unfollow)
362 post("/accounts/:id/block", AccountController, :block)
363 post("/accounts/:id/unblock", AccountController, :unblock)
364 post("/accounts/:id/mute", AccountController, :mute)
365 post("/accounts/:id/unmute", AccountController, :unmute)
367 get("/apps/verify_credentials", AppController, :verify_credentials)
369 get("/conversations", ConversationController, :index)
370 post("/conversations/:id/read", ConversationController, :mark_as_read)
372 get("/domain_blocks", DomainBlockController, :index)
373 post("/domain_blocks", DomainBlockController, :create)
374 delete("/domain_blocks", DomainBlockController, :delete)
376 get("/filters", FilterController, :index)
378 post("/filters", FilterController, :create)
379 get("/filters/:id", FilterController, :show)
380 put("/filters/:id", FilterController, :update)
381 delete("/filters/:id", FilterController, :delete)
383 get("/follow_requests", FollowRequestController, :index)
384 post("/follow_requests/:id/authorize", FollowRequestController, :authorize)
385 post("/follow_requests/:id/reject", FollowRequestController, :reject)
387 get("/lists", ListController, :index)
388 get("/lists/:id", ListController, :show)
389 get("/lists/:id/accounts", ListController, :list_accounts)
391 delete("/lists/:id", ListController, :delete)
392 post("/lists", ListController, :create)
393 put("/lists/:id", ListController, :update)
394 post("/lists/:id/accounts", ListController, :add_to_list)
395 delete("/lists/:id/accounts", ListController, :remove_from_list)
397 get("/markers", MarkerController, :index)
398 post("/markers", MarkerController, :upsert)
400 post("/media", MediaController, :create)
401 put("/media/:id", MediaController, :update)
403 get("/notifications", NotificationController, :index)
404 get("/notifications/:id", NotificationController, :show)
406 post("/notifications/:id/dismiss", NotificationController, :dismiss)
407 post("/notifications/clear", NotificationController, :clear)
408 delete("/notifications/destroy_multiple", NotificationController, :destroy_multiple)
409 # Deprecated: was removed in Mastodon v3, use `/notifications/:id/dismiss` instead
410 post("/notifications/dismiss", NotificationController, :dismiss_via_body)
412 post("/polls/:id/votes", PollController, :vote)
414 post("/reports", ReportController, :create)
416 get("/scheduled_statuses", ScheduledActivityController, :index)
417 get("/scheduled_statuses/:id", ScheduledActivityController, :show)
419 put("/scheduled_statuses/:id", ScheduledActivityController, :update)
420 delete("/scheduled_statuses/:id", ScheduledActivityController, :delete)
422 # Unlike `GET /api/v1/accounts/:id/favourites`, demands authentication
423 get("/favourites", StatusController, :favourites)
424 get("/bookmarks", StatusController, :bookmarks)
426 post("/statuses", StatusController, :create)
427 delete("/statuses/:id", StatusController, :delete)
428 post("/statuses/:id/reblog", StatusController, :reblog)
429 post("/statuses/:id/unreblog", StatusController, :unreblog)
430 post("/statuses/:id/favourite", StatusController, :favourite)
431 post("/statuses/:id/unfavourite", StatusController, :unfavourite)
432 post("/statuses/:id/pin", StatusController, :pin)
433 post("/statuses/:id/unpin", StatusController, :unpin)
434 post("/statuses/:id/bookmark", StatusController, :bookmark)
435 post("/statuses/:id/unbookmark", StatusController, :unbookmark)
436 post("/statuses/:id/mute", StatusController, :mute_conversation)
437 post("/statuses/:id/unmute", StatusController, :unmute_conversation)
439 post("/push/subscription", SubscriptionController, :create)
440 get("/push/subscription", SubscriptionController, :show)
441 put("/push/subscription", SubscriptionController, :update)
442 delete("/push/subscription", SubscriptionController, :delete)
444 get("/suggestions", SuggestionController, :index)
446 get("/timelines/home", TimelineController, :home)
447 get("/timelines/direct", TimelineController, :direct)
448 get("/timelines/list/:list_id", TimelineController, :list)
451 scope "/api/web", Pleroma.Web do
452 pipe_through(:authenticated_api)
454 put("/settings", MastoFEController, :put_settings)
457 scope "/api/v1", Pleroma.Web.MastodonAPI do
460 get("/accounts/search", SearchController, :account_search)
461 get("/search", SearchController, :search)
463 get("/accounts/:id/statuses", AccountController, :statuses)
464 get("/accounts/:id/followers", AccountController, :followers)
465 get("/accounts/:id/following", AccountController, :following)
466 get("/accounts/:id", AccountController, :show)
468 post("/accounts", AccountController, :create)
470 get("/instance", InstanceController, :show)
471 get("/instance/peers", InstanceController, :peers)
473 post("/apps", AppController, :create)
475 get("/statuses", StatusController, :index)
476 get("/statuses/:id", StatusController, :show)
477 get("/statuses/:id/context", StatusController, :context)
478 get("/statuses/:id/card", StatusController, :card)
479 get("/statuses/:id/favourited_by", StatusController, :favourited_by)
480 get("/statuses/:id/reblogged_by", StatusController, :reblogged_by)
482 get("/custom_emojis", CustomEmojiController, :index)
484 get("/trends", MastodonAPIController, :empty_array)
486 get("/timelines/public", TimelineController, :public)
487 get("/timelines/tag/:tag", TimelineController, :hashtag)
489 get("/polls/:id", PollController, :show)
492 scope "/api/v2", Pleroma.Web.MastodonAPI do
494 get("/search", SearchController, :search2)
497 scope "/api", Pleroma.Web do
498 pipe_through(:config)
500 get("/help/test", TwitterAPI.UtilController, :help_test)
501 post("/help/test", TwitterAPI.UtilController, :help_test)
502 get("/statusnet/config", TwitterAPI.UtilController, :config)
503 get("/statusnet/version", TwitterAPI.UtilController, :version)
504 get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
507 scope "/api", Pleroma.Web do
511 "/account/confirm_email/:user_id/:token",
512 TwitterAPI.Controller,
519 pipe_through(:base_api)
521 get("/openapi", OpenApiSpex.Plug.RenderSpec, [])
524 scope "/api", Pleroma.Web, as: :authenticated_twitter_api do
525 pipe_through(:authenticated_api)
527 get("/oauth_tokens", TwitterAPI.Controller, :oauth_tokens)
528 delete("/oauth_tokens/:id", TwitterAPI.Controller, :revoke_token)
531 "/qvitter/statuses/notifications/read",
532 TwitterAPI.Controller,
533 :mark_notifications_as_read
538 plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"])
539 plug(Pleroma.Plugs.StaticFEPlug)
543 plug(:accepts, ["json", "xml"])
546 scope "/", Pleroma.Web do
547 pipe_through([:ostatus, :http_signature])
549 get("/objects/:uuid", OStatus.OStatusController, :object)
550 get("/activities/:uuid", OStatus.OStatusController, :activity)
551 get("/notice/:id", OStatus.OStatusController, :notice)
552 get("/notice/:id/embed_player", OStatus.OStatusController, :notice_player)
554 get("/users/:nickname/feed", Feed.UserController, :feed, as: :user_feed)
555 get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
557 get("/tags/:tag", Feed.TagController, :feed, as: :tag_feed)
560 scope "/", Pleroma.Web do
561 pipe_through(:browser)
562 get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
565 scope "/", Pleroma.Web.ActivityPub do
566 # XXX: not really ostatus
567 pipe_through(:ostatus)
569 get("/users/:nickname/outbox", ActivityPubController, :outbox)
572 pipeline :ap_service_actor do
573 plug(:accepts, ["activity+json", "json"])
576 # Server to Server (S2S) AP interactions
577 pipeline :activitypub do
578 plug(:ap_service_actor)
579 plug(:http_signature)
582 # Client to Server (C2S) AP interactions
583 pipeline :activitypub_client do
584 plug(:ap_service_actor)
590 scope "/", Pleroma.Web.ActivityPub do
591 pipe_through([:activitypub_client])
593 get("/api/ap/whoami", ActivityPubController, :whoami)
594 get("/users/:nickname/inbox", ActivityPubController, :read_inbox)
596 post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
597 post("/api/ap/upload_media", ActivityPubController, :upload_media)
599 # The following two are S2S as well, see `ActivityPub.fetch_follow_information_for_user/1`:
600 get("/users/:nickname/followers", ActivityPubController, :followers)
601 get("/users/:nickname/following", ActivityPubController, :following)
604 scope "/", Pleroma.Web.ActivityPub do
605 pipe_through(:activitypub)
606 post("/inbox", ActivityPubController, :inbox)
607 post("/users/:nickname/inbox", ActivityPubController, :inbox)
610 scope "/relay", Pleroma.Web.ActivityPub do
611 pipe_through(:ap_service_actor)
613 get("/", ActivityPubController, :relay)
616 pipe_through(:http_signature)
617 post("/inbox", ActivityPubController, :inbox)
620 get("/following", ActivityPubController, :relay_following)
621 get("/followers", ActivityPubController, :relay_followers)
624 scope "/internal/fetch", Pleroma.Web.ActivityPub do
625 pipe_through(:ap_service_actor)
627 get("/", ActivityPubController, :internal_fetch)
628 post("/inbox", ActivityPubController, :inbox)
631 scope "/.well-known", Pleroma.Web do
632 pipe_through(:well_known)
634 get("/host-meta", WebFinger.WebFingerController, :host_meta)
635 get("/webfinger", WebFinger.WebFingerController, :webfinger)
636 get("/nodeinfo", Nodeinfo.NodeinfoController, :schemas)
639 scope "/nodeinfo", Pleroma.Web do
640 get("/:version", Nodeinfo.NodeinfoController, :nodeinfo)
643 scope "/", Pleroma.Web do
646 get("/web/manifest.json", MastoFEController, :manifest)
649 scope "/", Pleroma.Web do
650 pipe_through(:mastodon_html)
652 get("/web/login", MastodonAPI.AuthController, :login)
653 delete("/auth/sign_out", MastodonAPI.AuthController, :logout)
655 post("/auth/password", MastodonAPI.AuthController, :password_reset)
657 get("/web/*path", MastoFEController, :index)
660 scope "/proxy/", Pleroma.Web.MediaProxy do
661 get("/:sig/:url", MediaProxyController, :remote)
662 get("/:sig/:url/:filename", MediaProxyController, :remote)
665 if Pleroma.Config.get(:env) == :dev do
667 pipe_through([:mailbox_preview])
669 forward("/mailbox", Plug.Swoosh.MailboxPreview, base_path: "/dev/mailbox")
673 # Test-only routes needed to test action dispatching and plug chain execution
674 if Pleroma.Config.get(:env) == :test do
677 :fallback_oauth_check,
679 :fallback_oauth_skip_publicity_check,
680 :skip_oauth_skip_publicity_check,
681 :missing_oauth_check_definition
684 scope "/test/api", Pleroma.Tests do
687 for action <- @test_actions do
688 get("/#{action}", AuthTestController, action)
692 scope "/test/authenticated_api", Pleroma.Tests do
693 pipe_through(:authenticated_api)
695 for action <- @test_actions do
696 get("/#{action}", AuthTestController, action)
701 scope "/", Pleroma.Web.MongooseIM do
702 get("/user_exists", MongooseIMController, :user_exists)
703 get("/check_password", MongooseIMController, :check_password)
706 scope "/", Fallback do
707 get("/registration/:token", RedirectController, :registration_page)
708 get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
709 get("/api*path", RedirectController, :api_not_implemented)
710 get("/*path", RedirectController, :redirector)
712 options("/*path", RedirectController, :empty)