1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 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)
19 plug(:accepts, ["json"])
21 plug(Pleroma.Plugs.OAuthPlug)
22 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
23 plug(Pleroma.Plugs.UserFetcherPlug)
24 plug(Pleroma.Plugs.SessionAuthenticationPlug)
25 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
26 plug(Pleroma.Plugs.AuthenticationPlug)
27 plug(Pleroma.Plugs.UserEnabledPlug)
28 plug(Pleroma.Plugs.SetUserSessionIdPlug)
29 plug(Pleroma.Plugs.EnsureUserKeyPlug)
30 plug(Pleroma.Plugs.IdempotencyPlug)
33 pipeline :authenticated_api do
34 plug(:accepts, ["json"])
36 plug(Pleroma.Plugs.OAuthPlug)
37 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
38 plug(Pleroma.Plugs.UserFetcherPlug)
39 plug(Pleroma.Plugs.SessionAuthenticationPlug)
40 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
41 plug(Pleroma.Plugs.AuthenticationPlug)
42 plug(Pleroma.Plugs.UserEnabledPlug)
43 plug(Pleroma.Plugs.SetUserSessionIdPlug)
44 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
45 plug(Pleroma.Plugs.IdempotencyPlug)
48 pipeline :admin_api do
49 plug(:accepts, ["json"])
51 plug(Pleroma.Plugs.OAuthPlug)
52 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
53 plug(Pleroma.Plugs.UserFetcherPlug)
54 plug(Pleroma.Plugs.SessionAuthenticationPlug)
55 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
56 plug(Pleroma.Plugs.AuthenticationPlug)
57 plug(Pleroma.Plugs.AdminSecretAuthenticationPlug)
58 plug(Pleroma.Plugs.UserEnabledPlug)
59 plug(Pleroma.Plugs.SetUserSessionIdPlug)
60 plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
61 plug(Pleroma.Plugs.UserIsAdminPlug)
62 plug(Pleroma.Plugs.IdempotencyPlug)
65 pipeline :mastodon_html do
66 plug(:accepts, ["html"])
68 plug(Pleroma.Plugs.OAuthPlug)
69 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
70 plug(Pleroma.Plugs.UserFetcherPlug)
71 plug(Pleroma.Plugs.SessionAuthenticationPlug)
72 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
73 plug(Pleroma.Plugs.AuthenticationPlug)
74 plug(Pleroma.Plugs.UserEnabledPlug)
75 plug(Pleroma.Plugs.SetUserSessionIdPlug)
76 plug(Pleroma.Plugs.EnsureUserKeyPlug)
79 pipeline :pleroma_html do
80 plug(:accepts, ["html"])
82 plug(Pleroma.Plugs.OAuthPlug)
83 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
84 plug(Pleroma.Plugs.UserFetcherPlug)
85 plug(Pleroma.Plugs.SessionAuthenticationPlug)
86 plug(Pleroma.Plugs.AuthenticationPlug)
87 plug(Pleroma.Plugs.EnsureUserKeyPlug)
90 pipeline :oauth_read_or_public do
91 plug(Pleroma.Plugs.OAuthScopesPlug, %{
93 fallback: :proceed_unauthenticated
96 plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
99 pipeline :oauth_read do
100 plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["read"]})
103 pipeline :oauth_write do
104 plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["write"]})
107 pipeline :oauth_follow do
108 plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["follow"]})
111 pipeline :oauth_push do
112 plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["push"]})
115 pipeline :well_known do
116 plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
120 plug(:accepts, ["json", "xml"])
123 pipeline :pleroma_api do
124 plug(:accepts, ["html", "json"])
127 pipeline :mailbox_preview do
128 plug(:accepts, ["html"])
130 plug(:put_secure_browser_headers, %{
131 "content-security-policy" =>
132 "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'"
136 pipeline :http_signature do
137 plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
140 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
141 pipe_through(:pleroma_api)
143 get("/password_reset/:token", PasswordController, :reset, as: :reset_password)
144 post("/password_reset", PasswordController, :do_reset, as: :reset_password)
145 get("/emoji", UtilController, :emoji)
146 get("/captcha", UtilController, :captcha)
147 get("/healthcheck", UtilController, :healthcheck)
150 scope "/api/pleroma", Pleroma.Web do
151 pipe_through(:pleroma_api)
152 post("/uploader_callback/:upload_path", UploaderController, :callback)
155 scope "/api/pleroma/admin", Pleroma.Web.AdminAPI do
156 pipe_through([:admin_api, :oauth_write])
158 post("/users/follow", AdminAPIController, :user_follow)
159 post("/users/unfollow", AdminAPIController, :user_unfollow)
161 delete("/users", AdminAPIController, :user_delete)
162 post("/users", AdminAPIController, :users_create)
163 patch("/users/:nickname/toggle_activation", AdminAPIController, :user_toggle_activation)
164 put("/users/tag", AdminAPIController, :tag_users)
165 delete("/users/tag", AdminAPIController, :untag_users)
167 get("/users/:nickname/permission_group", AdminAPIController, :right_get)
168 get("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_get)
169 post("/users/:nickname/permission_group/:permission_group", AdminAPIController, :right_add)
172 "/users/:nickname/permission_group/:permission_group",
177 put("/users/:nickname/activation_status", AdminAPIController, :set_activation_status)
179 post("/relay", AdminAPIController, :relay_follow)
180 delete("/relay", AdminAPIController, :relay_unfollow)
182 get("/users/invite_token", AdminAPIController, :get_invite_token)
183 get("/users/invites", AdminAPIController, :invites)
184 post("/users/revoke_invite", AdminAPIController, :revoke_invite)
185 post("/users/email_invite", AdminAPIController, :email_invite)
187 get("/users/:nickname/password_reset", AdminAPIController, :get_password_reset)
189 get("/users", AdminAPIController, :list_users)
190 get("/users/:nickname", AdminAPIController, :user_show)
191 get("/users/:nickname/statuses", AdminAPIController, :list_user_statuses)
193 get("/reports", AdminAPIController, :list_reports)
194 get("/reports/:id", AdminAPIController, :report_show)
195 put("/reports/:id", AdminAPIController, :report_update_state)
196 post("/reports/:id/respond", AdminAPIController, :report_respond)
198 put("/statuses/:id", AdminAPIController, :status_update)
199 delete("/statuses/:id", AdminAPIController, :status_delete)
201 get("/config", AdminAPIController, :config_show)
202 post("/config", AdminAPIController, :config_update)
203 get("/config/migrate_to_db", AdminAPIController, :migrate_to_db)
204 get("/config/migrate_from_db", AdminAPIController, :migrate_from_db)
206 get("/moderation_log", AdminAPIController, :list_log)
209 scope "/", Pleroma.Web.TwitterAPI do
210 pipe_through(:pleroma_html)
212 post("/main/ostatus", UtilController, :remote_subscribe)
213 get("/ostatus_subscribe", UtilController, :remote_follow)
216 pipe_through(:oauth_follow)
217 post("/ostatus_subscribe", UtilController, :do_remote_follow)
221 scope "/api/pleroma", Pleroma.Web.TwitterAPI do
222 pipe_through(:authenticated_api)
225 pipe_through(:oauth_write)
227 post("/change_email", UtilController, :change_email)
228 post("/change_password", UtilController, :change_password)
229 post("/delete_account", UtilController, :delete_account)
230 put("/notification_settings", UtilController, :update_notificaton_settings)
231 post("/disable_account", UtilController, :disable_account)
235 pipe_through(:oauth_follow)
237 post("/blocks_import", UtilController, :blocks_import)
238 post("/follow_import", UtilController, :follow_import)
242 scope "/oauth", Pleroma.Web.OAuth do
245 get("/authorize", OAuthController, :authorize)
248 post("/authorize", OAuthController, :create_authorization)
249 post("/token", OAuthController, :token_exchange)
250 post("/revoke", OAuthController, :token_revoke)
251 get("/registration_details", OAuthController, :registration_details)
254 pipe_through(:browser)
256 get("/prepare_request", OAuthController, :prepare_request)
257 get("/:provider", OAuthController, :request)
258 get("/:provider/callback", OAuthController, :callback)
259 post("/register", OAuthController, :register)
263 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
266 get("/statuses/:id/emoji_reactions_by", PleromaAPIController, :emoji_reactions_by)
269 scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
270 pipe_through(:authenticated_api)
273 pipe_through(:oauth_read)
274 get("/conversations/:id/statuses", PleromaAPIController, :conversation_statuses)
275 get("/conversations/:id", PleromaAPIController, :conversation)
279 pipe_through(:oauth_write)
280 patch("/conversations/:id", PleromaAPIController, :update_conversation)
281 post("/statuses/:id/react_with_emoji", PleromaAPIController, :react_with_emoji)
282 post("/notifications/read", PleromaAPIController, :read_notification)
286 scope "/api/v1", Pleroma.Web.MastodonAPI do
287 pipe_through(:authenticated_api)
290 pipe_through(:oauth_read)
292 get("/accounts/verify_credentials", MastodonAPIController, :verify_credentials)
294 get("/accounts/relationships", MastodonAPIController, :relationships)
296 get("/accounts/:id/lists", MastodonAPIController, :account_lists)
297 get("/accounts/:id/identity_proofs", MastodonAPIController, :empty_array)
299 get("/follow_requests", MastodonAPIController, :follow_requests)
300 get("/blocks", MastodonAPIController, :blocks)
301 get("/mutes", MastodonAPIController, :mutes)
303 get("/timelines/home", MastodonAPIController, :home_timeline)
304 get("/timelines/direct", MastodonAPIController, :dm_timeline)
306 get("/favourites", MastodonAPIController, :favourites)
307 get("/bookmarks", MastodonAPIController, :bookmarks)
309 post("/notifications/clear", MastodonAPIController, :clear_notifications)
310 post("/notifications/dismiss", MastodonAPIController, :dismiss_notification)
311 get("/notifications", MastodonAPIController, :notifications)
312 get("/notifications/:id", MastodonAPIController, :get_notification)
313 delete("/notifications/destroy_multiple", MastodonAPIController, :destroy_multiple)
315 get("/scheduled_statuses", MastodonAPIController, :scheduled_statuses)
316 get("/scheduled_statuses/:id", MastodonAPIController, :show_scheduled_status)
318 get("/lists", ListController, :index)
319 get("/lists/:id", ListController, :show)
320 get("/lists/:id/accounts", ListController, :list_accounts)
322 get("/domain_blocks", MastodonAPIController, :domain_blocks)
324 get("/filters", MastodonAPIController, :get_filters)
326 get("/suggestions", MastodonAPIController, :suggestions)
328 get("/conversations", MastodonAPIController, :conversations)
329 post("/conversations/:id/read", MastodonAPIController, :conversation_read)
331 get("/endorsements", MastodonAPIController, :empty_array)
335 pipe_through(:oauth_write)
337 patch("/accounts/update_credentials", MastodonAPIController, :update_credentials)
339 post("/statuses", MastodonAPIController, :post_status)
340 delete("/statuses/:id", MastodonAPIController, :delete_status)
342 post("/statuses/:id/reblog", MastodonAPIController, :reblog_status)
343 post("/statuses/:id/unreblog", MastodonAPIController, :unreblog_status)
344 post("/statuses/:id/favourite", MastodonAPIController, :fav_status)
345 post("/statuses/:id/unfavourite", MastodonAPIController, :unfav_status)
346 post("/statuses/:id/pin", MastodonAPIController, :pin_status)
347 post("/statuses/:id/unpin", MastodonAPIController, :unpin_status)
348 post("/statuses/:id/bookmark", MastodonAPIController, :bookmark_status)
349 post("/statuses/:id/unbookmark", MastodonAPIController, :unbookmark_status)
350 post("/statuses/:id/mute", MastodonAPIController, :mute_conversation)
351 post("/statuses/:id/unmute", MastodonAPIController, :unmute_conversation)
353 put("/scheduled_statuses/:id", MastodonAPIController, :update_scheduled_status)
354 delete("/scheduled_statuses/:id", MastodonAPIController, :delete_scheduled_status)
356 post("/polls/:id/votes", MastodonAPIController, :poll_vote)
358 post("/media", MastodonAPIController, :upload)
359 put("/media/:id", MastodonAPIController, :update_media)
361 delete("/lists/:id", ListController, :delete)
362 post("/lists", ListController, :create)
363 put("/lists/:id", ListController, :update)
365 post("/lists/:id/accounts", ListController, :add_to_list)
366 delete("/lists/:id/accounts", ListController, :remove_from_list)
368 post("/filters", MastodonAPIController, :create_filter)
369 get("/filters/:id", MastodonAPIController, :get_filter)
370 put("/filters/:id", MastodonAPIController, :update_filter)
371 delete("/filters/:id", MastodonAPIController, :delete_filter)
373 patch("/pleroma/accounts/update_avatar", MastodonAPIController, :update_avatar)
374 patch("/pleroma/accounts/update_banner", MastodonAPIController, :update_banner)
375 patch("/pleroma/accounts/update_background", MastodonAPIController, :update_background)
377 get("/pleroma/mascot", MastodonAPIController, :get_mascot)
378 put("/pleroma/mascot", MastodonAPIController, :set_mascot)
380 post("/reports", MastodonAPIController, :reports)
384 pipe_through(:oauth_follow)
386 post("/follows", MastodonAPIController, :follow)
387 post("/accounts/:id/follow", MastodonAPIController, :follow)
389 post("/accounts/:id/unfollow", MastodonAPIController, :unfollow)
390 post("/accounts/:id/block", MastodonAPIController, :block)
391 post("/accounts/:id/unblock", MastodonAPIController, :unblock)
392 post("/accounts/:id/mute", MastodonAPIController, :mute)
393 post("/accounts/:id/unmute", MastodonAPIController, :unmute)
395 post("/follow_requests/:id/authorize", MastodonAPIController, :authorize_follow_request)
396 post("/follow_requests/:id/reject", MastodonAPIController, :reject_follow_request)
398 post("/domain_blocks", MastodonAPIController, :block_domain)
399 delete("/domain_blocks", MastodonAPIController, :unblock_domain)
401 post("/pleroma/accounts/:id/subscribe", MastodonAPIController, :subscribe)
402 post("/pleroma/accounts/:id/unsubscribe", MastodonAPIController, :unsubscribe)
406 pipe_through(:oauth_push)
408 post("/push/subscription", SubscriptionController, :create)
409 get("/push/subscription", SubscriptionController, :get)
410 put("/push/subscription", SubscriptionController, :update)
411 delete("/push/subscription", SubscriptionController, :delete)
415 scope "/api/web", Pleroma.Web.MastodonAPI do
416 pipe_through([:authenticated_api, :oauth_write])
418 put("/settings", MastodonAPIController, :put_settings)
421 scope "/api/v1", Pleroma.Web.MastodonAPI do
424 post("/accounts", MastodonAPIController, :account_register)
426 get("/instance", MastodonAPIController, :masto_instance)
427 get("/instance/peers", MastodonAPIController, :peers)
428 post("/apps", MastodonAPIController, :create_app)
429 get("/apps/verify_credentials", MastodonAPIController, :verify_app_credentials)
430 get("/custom_emojis", MastodonAPIController, :custom_emojis)
432 get("/statuses/:id/card", MastodonAPIController, :status_card)
434 get("/statuses/:id/favourited_by", MastodonAPIController, :favourited_by)
435 get("/statuses/:id/reblogged_by", MastodonAPIController, :reblogged_by)
437 get("/trends", MastodonAPIController, :empty_array)
439 get("/accounts/search", SearchController, :account_search)
442 "/pleroma/accounts/confirmation_resend",
443 MastodonAPIController,
444 :account_confirmation_resend
448 pipe_through(:oauth_read_or_public)
450 get("/timelines/public", MastodonAPIController, :public_timeline)
451 get("/timelines/tag/:tag", MastodonAPIController, :hashtag_timeline)
452 get("/timelines/list/:list_id", MastodonAPIController, :list_timeline)
454 get("/statuses", MastodonAPIController, :get_statuses)
455 get("/statuses/:id", MastodonAPIController, :get_status)
456 get("/statuses/:id/context", MastodonAPIController, :get_context)
458 get("/polls/:id", MastodonAPIController, :get_poll)
460 get("/accounts/:id/statuses", MastodonAPIController, :user_statuses)
461 get("/accounts/:id/followers", MastodonAPIController, :followers)
462 get("/accounts/:id/following", MastodonAPIController, :following)
463 get("/accounts/:id", MastodonAPIController, :user)
465 get("/search", SearchController, :search)
467 get("/pleroma/accounts/:id/favourites", MastodonAPIController, :user_favourites)
471 scope "/api/v2", Pleroma.Web.MastodonAPI do
472 pipe_through([:api, :oauth_read_or_public])
473 get("/search", SearchController, :search2)
476 scope "/api", Pleroma.Web do
477 pipe_through(:config)
479 get("/help/test", TwitterAPI.UtilController, :help_test)
480 post("/help/test", TwitterAPI.UtilController, :help_test)
481 get("/statusnet/config", TwitterAPI.UtilController, :config)
482 get("/statusnet/version", TwitterAPI.UtilController, :version)
483 get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
486 scope "/api", Pleroma.Web do
490 "/account/confirm_email/:user_id/:token",
491 TwitterAPI.Controller,
497 scope "/api", Pleroma.Web, as: :authenticated_twitter_api do
498 pipe_through(:authenticated_api)
500 get("/oauth_tokens", TwitterAPI.Controller, :oauth_tokens)
501 delete("/oauth_tokens/:id", TwitterAPI.Controller, :revoke_token)
504 pipe_through(:oauth_read)
506 post("/qvitter/statuses/notifications/read", TwitterAPI.Controller, :notifications_read)
510 pipeline :ap_service_actor do
511 plug(:accepts, ["activity+json", "json"])
515 plug(:accepts, ["html", "xml", "atom", "activity+json", "json"])
519 plug(:accepts, ["json", "xml"])
522 scope "/", Pleroma.Web do
523 pipe_through(:ostatus)
525 get("/objects/:uuid", OStatus.OStatusController, :object)
526 get("/activities/:uuid", OStatus.OStatusController, :activity)
527 get("/notice/:id", OStatus.OStatusController, :notice)
528 get("/notice/:id/embed_player", OStatus.OStatusController, :notice_player)
529 get("/users/:nickname/feed", OStatus.OStatusController, :feed)
530 get("/users/:nickname", OStatus.OStatusController, :feed_redirect)
532 post("/users/:nickname/salmon", OStatus.OStatusController, :salmon_incoming)
533 post("/push/hub/:nickname", Websub.WebsubController, :websub_subscription_request)
534 get("/push/subscriptions/:id", Websub.WebsubController, :websub_subscription_confirmation)
535 post("/push/subscriptions/:id", Websub.WebsubController, :websub_incoming)
537 get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
540 pipeline :activitypub do
541 plug(:accepts, ["activity+json", "json"])
542 plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
543 plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
546 scope "/", Pleroma.Web.ActivityPub do
547 # XXX: not really ostatus
548 pipe_through(:ostatus)
550 get("/users/:nickname/outbox", ActivityPubController, :outbox)
551 get("/objects/:uuid/likes", ActivityPubController, :object_likes)
554 pipeline :activitypub_client do
555 plug(:accepts, ["activity+json", "json"])
557 plug(Pleroma.Plugs.OAuthPlug)
558 plug(Pleroma.Plugs.BasicAuthDecoderPlug)
559 plug(Pleroma.Plugs.UserFetcherPlug)
560 plug(Pleroma.Plugs.SessionAuthenticationPlug)
561 plug(Pleroma.Plugs.LegacyAuthenticationPlug)
562 plug(Pleroma.Plugs.AuthenticationPlug)
563 plug(Pleroma.Plugs.UserEnabledPlug)
564 plug(Pleroma.Plugs.SetUserSessionIdPlug)
565 plug(Pleroma.Plugs.EnsureUserKeyPlug)
568 scope "/", Pleroma.Web.ActivityPub do
569 pipe_through([:activitypub_client])
572 pipe_through(:oauth_read)
573 get("/api/ap/whoami", ActivityPubController, :whoami)
574 get("/users/:nickname/inbox", ActivityPubController, :read_inbox)
578 pipe_through(:oauth_write)
579 post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
583 pipe_through(:oauth_read_or_public)
584 get("/users/:nickname/followers", ActivityPubController, :followers)
585 get("/users/:nickname/following", ActivityPubController, :following)
589 scope "/", Pleroma.Web.ActivityPub do
590 pipe_through(:activitypub)
591 post("/inbox", ActivityPubController, :inbox)
592 post("/users/:nickname/inbox", ActivityPubController, :inbox)
595 scope "/relay", Pleroma.Web.ActivityPub do
596 pipe_through(:ap_service_actor)
598 get("/", ActivityPubController, :relay)
601 pipe_through(:http_signature)
602 post("/inbox", ActivityPubController, :inbox)
605 get("/following", ActivityPubController, :following, assigns: %{relay: true})
606 get("/followers", ActivityPubController, :followers, assigns: %{relay: true})
609 scope "/internal/fetch", Pleroma.Web.ActivityPub do
610 pipe_through(:ap_service_actor)
612 get("/", ActivityPubController, :internal_fetch)
613 post("/inbox", ActivityPubController, :inbox)
616 scope "/.well-known", Pleroma.Web do
617 pipe_through(:well_known)
619 get("/host-meta", WebFinger.WebFingerController, :host_meta)
620 get("/webfinger", WebFinger.WebFingerController, :webfinger)
621 get("/nodeinfo", Nodeinfo.NodeinfoController, :schemas)
624 scope "/nodeinfo", Pleroma.Web do
625 get("/:version", Nodeinfo.NodeinfoController, :nodeinfo)
628 scope "/", Pleroma.Web.MastodonAPI do
629 pipe_through(:mastodon_html)
631 get("/web/login", MastodonAPIController, :login)
632 delete("/auth/sign_out", MastodonAPIController, :logout)
634 post("/auth/password", MastodonAPIController, :password_reset)
637 pipe_through(:oauth_read)
638 get("/web/*path", MastodonAPIController, :index)
642 pipeline :remote_media do
645 scope "/proxy/", Pleroma.Web.MediaProxy do
646 pipe_through(:remote_media)
648 get("/:sig/:url", MediaProxyController, :remote)
649 get("/:sig/:url/:filename", MediaProxyController, :remote)
652 if Pleroma.Config.get(:env) == :dev do
654 pipe_through([:mailbox_preview])
656 forward("/mailbox", Plug.Swoosh.MailboxPreview, base_path: "/dev/mailbox")
660 scope "/", Pleroma.Web.MongooseIM do
661 get("/user_exists", MongooseIMController, :user_exists)
662 get("/check_password", MongooseIMController, :check_password)
665 scope "/", Fallback do
666 get("/registration/:token", RedirectController, :registration_page)
667 get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
668 get("/api*path", RedirectController, :api_not_implemented)
669 get("/*path", RedirectController, :redirector)
671 options("/*path", RedirectController, :empty)