Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
11KB

  1. <?php
  2. use Friendica\App\Router as R;
  3. use Friendica\Module;
  4. /**
  5. * Configuration for the default routes in Friendica
  6. *
  7. * The syntax is either
  8. * - 'route' => [ Module::class , [ HTTPMethod(s) ] ]
  9. * - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ]
  10. *
  11. * It's possible to create recursive groups
  12. */
  13. return [
  14. '/' => [Module\Home::class, [R::GET]],
  15. '/.well-known' => [
  16. '/host-meta' => [Module\WellKnown\HostMeta::class, [R::GET]],
  17. '/nodeinfo[/1.0]' => [Module\NodeInfo::class, [R::GET]],
  18. '/webfinger' => [Module\Xrd::class, [R::GET]],
  19. '/x-social-relay' => [Module\WellKnown\XSocialRelay::class, [R::GET]],
  20. ],
  21. '/2fa' => [
  22. '[/]' => [Module\TwoFactor\Verify::class, [R::GET, R::POST]],
  23. '/recovery' => [Module\TwoFactor\Recovery::class, [R::GET, R::POST]],
  24. ],
  25. '/admin' => [
  26. '[/]' => [Module\Admin\Summary::class, [R::GET]],
  27. '/addons' => [Module\Admin\Addons\Index::class, [R::GET, R::POST]],
  28. '/addons/{addon}' => [Module\Admin\Addons\Details::class, [R::GET, R::POST]],
  29. '/blocklist/contact' => [Module\Admin\Blocklist\Contact::class, [R::GET, R::POST]],
  30. '/blocklist/server' => [Module\Admin\Blocklist\Server::class, [R::GET, R::POST]],
  31. '/dbsync[/check]' => [Module\Admin\DBSync::class, [R::GET]],
  32. '/dbsync/{update:\d+}' => [Module\Admin\DBSync::class, [R::GET]],
  33. '/dbsync/mark/{update:\d+}' => [Module\Admin\DBSync::class, [R::GET]],
  34. '/features' => [Module\Admin\Features::class, [R::GET, R::POST]],
  35. '/federation' => [Module\Admin\Federation::class, [R::GET]],
  36. '/item/delete' => [Module\Admin\Item\Delete::class, [R::GET, R::POST]],
  37. '/item/source[/{guid}]' => [Module\Admin\Item\Source::class, [R::GET, R::POST]],
  38. '/logs/view' => [Module\Admin\Logs\View::class, [R::GET]],
  39. '/logs' => [Module\Admin\Logs\Settings::class, [R::GET, R::POST]],
  40. '/phpinfo' => [Module\Admin\PhpInfo::class, [R::GET]],
  41. '/queue[/deferred]' => [Module\Admin\Queue::class, [R::GET]],
  42. '/site' => [Module\Admin\Site::class, [R::GET, R::POST]],
  43. '/themes' => [Module\Admin\Themes\Index::class, [R::GET, R::POST]],
  44. '/themes/{theme}' => [Module\Admin\Themes\Details::class, [R::GET, R::POST]],
  45. '/themes/{theme}/embed' => [Module\Admin\Themes\Embed::class, [R::GET, R::POST]],
  46. '/tos' => [Module\Admin\Tos::class, [R::GET, R::POST]],
  47. '/users[/{action}/{uid}]' => [Module\Admin\Users::class, [R::GET, R::POST]],
  48. ],
  49. '/amcd' => [Module\AccountManagementControlDocument::class, [R::GET]],
  50. '/acctlink' => [Module\Acctlink::class, [R::GET]],
  51. '/allfriends/{id:\d+}' => [Module\AllFriends::class, [R::GET]],
  52. '/apps' => [Module\Apps::class, [R::GET]],
  53. '/attach/{item:\d+}' => [Module\Attach::class, [R::GET]],
  54. '/babel' => [Module\Debug\Babel::class, [R::GET, R::POST]],
  55. '/bookmarklet' => [Module\Bookmarklet::class, [R::GET]],
  56. '/compose[/{type}]' => [Module\Item\Compose::class, [R::GET, R::POST]],
  57. '/contact' => [
  58. '[/]' => [Module\Contact::class, [R::GET]],
  59. '/{id:\d+}[/]' => [Module\Contact::class, [R::GET, R::POST]],
  60. '/{id:\d+}/archive' => [Module\Contact::class, [R::GET]],
  61. '/{id:\d+}/block' => [Module\Contact::class, [R::GET]],
  62. '/{id:\d+}/conversations' => [Module\Contact::class, [R::GET]],
  63. '/{id:\d+}/drop' => [Module\Contact::class, [R::GET]],
  64. '/{id:\d+}/ignore' => [Module\Contact::class, [R::GET]],
  65. '/{id:\d+}/posts' => [Module\Contact::class, [R::GET]],
  66. '/{id:\d+}/update' => [Module\Contact::class, [R::GET]],
  67. '/{id:\d+}/updateprofile' => [Module\Contact::class, [R::GET]],
  68. '/archived' => [Module\Contact::class, [R::GET]],
  69. '/batch' => [Module\Contact::class, [R::GET, R::POST]],
  70. '/pending' => [Module\Contact::class, [R::GET]],
  71. '/blocked' => [Module\Contact::class, [R::GET]],
  72. '/hidden' => [Module\Contact::class, [R::GET]],
  73. '/ignored' => [Module\Contact::class, [R::GET]],
  74. ],
  75. '/credits' => [Module\Credits::class, [R::GET]],
  76. '/dirfind' => [Module\Search\Directory::class, [R::GET]],
  77. '/directory' => [Module\Directory::class, [R::GET]],
  78. '/feed' => [
  79. '/{nickname}' => [Module\Feed::class, [R::GET]],
  80. '/{nickname}/posts' => [Module\Feed::class, [R::GET]],
  81. '/{nickname}/comments' => [Module\Feed::class, [R::GET]],
  82. '/{nickname}/replies' => [Module\Feed::class, [R::GET]],
  83. '/{nickname}/activity' => [Module\Feed::class, [R::GET]],
  84. ],
  85. '/feedtest' => [Module\Debug\Feed::class, [R::GET]],
  86. '/fetch' => [
  87. '/post/{guid}' => [Module\Diaspora\Fetch::class, [R::GET]],
  88. '/status_message/{guid}' => [Module\Diaspora\Fetch::class, [R::GET]],
  89. '/reshare/{guid}' => [Module\Diaspora\Fetch::class, [R::GET]],
  90. ],
  91. '/filer[/{id:\d+}]' => [Module\Filer\SaveTag::class, [R::GET]],
  92. '/filerm/{id:\d+}' => [Module\Filer\RemoveTag::class, [R::GET]],
  93. '/follow_confirm' => [Module\FollowConfirm::class, [R::GET, R::POST]],
  94. '/followers/{owner}' => [Module\Followers::class, [R::GET]],
  95. '/following/{owner}' => [Module\Following::class, [R::GET]],
  96. '/friendica[/json]' => [Module\Friendica::class, [R::GET]],
  97. '/group' => [
  98. '[/]' => [Module\Group::class, [R::GET, R::POST]],
  99. '/{group:\d+}' => [Module\Group::class, [R::GET, R::POST]],
  100. '/none' => [Module\Group::class, [R::GET, R::POST]],
  101. '/new' => [Module\Group::class, [R::GET, R::POST]],
  102. '/drop/{group:\d+}' => [Module\Group::class, [R::GET, R::POST]],
  103. '/{group:\d+}/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]],
  104. '/{group:\d+}/add/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]],
  105. '/{group:\d+}/remove/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]],
  106. ],
  107. '/hashtag' => [Module\Hashtag::class, [R::GET]],
  108. '/home' => [Module\Home::class, [R::GET]],
  109. '/help[/{doc:.+}]' => [Module\Help::class, [R::GET]],
  110. '/inbox[/{nickname}]' => [Module\Inbox::class, [R::GET, R::POST]],
  111. '/invite' => [Module\Invite::class, [R::GET, R::POST]],
  112. '/install' => [
  113. '[/]' => [Module\Install::class, [R::GET, R::POST]],
  114. '/testrewrite' => [Module\Install::class, [R::GET]],
  115. ],
  116. '/like/{item:\d+}' => [Module\Like::class, [R::GET]],
  117. '/localtime' => [Module\Debug\Localtime::class, [R::GET, R::POST]],
  118. '/login' => [Module\Login::class, [R::GET, R::POST]],
  119. '/logout' => [Module\Logout::class, [R::GET, R::POST]],
  120. '/magic' => [Module\Magic::class, [R::GET]],
  121. '/maintenance' => [Module\Maintenance::class, [R::GET]],
  122. '/manifest' => [Module\Manifest::class, [R::GET]],
  123. '/modexp/{nick}' => [Module\PublicRSAKey::class, [R::GET]],
  124. '/newmember' => [Module\Welcome::class, [R::GET]],
  125. '/nodeinfo/1.0' => [Module\NodeInfo::class, [R::GET]],
  126. '/nogroup' => [Module\Group::class, [R::GET]],
  127. '/notify' => [
  128. '[/]' => [Module\Notifications\Notify::class, [R::GET]],
  129. '/view/{id:\d+}' => [Module\Notifications\Notify::class, [R::GET]],
  130. '/mark/all' => [Module\Notifications\Notify::class, [R::GET]],
  131. ],
  132. '/objects/{guid}' => [Module\Objects::class, [R::GET]],
  133. '/oembed' => [
  134. '/b2h' => [Module\Oembed::class, [R::GET]],
  135. '/h2b' => [Module\Oembed::class, [R::GET]],
  136. '/{hash}' => [Module\Oembed::class, [R::GET]],
  137. ],
  138. '/outbox/{owner}' => [Module\Outbox::class, [R::GET]],
  139. '/owa' => [Module\Owa::class, [R::GET]],
  140. '/opensearch' => [Module\OpenSearch::class, [R::GET]],
  141. '/photo' => [
  142. '/{name}' => [Module\Photo::class, [R::GET]],
  143. '/{type}/{name}' => [Module\Photo::class, [R::GET]],
  144. '/{type}/{customize}/{name}' => [Module\Photo::class, [R::GET]],
  145. ],
  146. '/pretheme' => [Module\ThemeDetails::class, [R::GET]],
  147. '/probe' => [Module\Debug\Probe::class, [R::GET]],
  148. '/profile' => [
  149. '/{nickname}' => [Module\Profile::class, [R::GET]],
  150. '/{nickname}/{to:\d{4}-\d{2}-\d{2}}/{from:\d{4}-\d{2}-\d{2}}' => [Module\Profile::class, [R::GET]],
  151. '/{nickname}/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
  152. '/{profile:\d+}/view' => [Module\Profile::class, [R::GET]],
  153. ],
  154. '/proxy' => [
  155. '[/]' => [Module\Proxy::class, [R::GET]],
  156. '/{url}' => [Module\Proxy::class, [R::GET]],
  157. '/{sub1}/{url}' => [Module\Proxy::class, [R::GET]],
  158. '/{sub1}/{sub2}/{url}' => [Module\Proxy::class, [R::GET]],
  159. ],
  160. '/search' => [
  161. '[/]' => [Module\Search\Index::class, [R::GET]],
  162. '/acl' => [Module\Search\Acl::class, [R::GET, R::POST]],
  163. '/saved/add/{term}' => [Module\Search\Saved::class, [R::GET]],
  164. '/saved/remove/{term}' => [Module\Search\Saved::class, [R::GET]],
  165. ],
  166. '/settings' => [
  167. '/2fa' => [
  168. '[/]' => [Module\Settings\TwoFactor\Index::class, [R::GET, R::POST]],
  169. '/recovery' => [Module\Settings\TwoFactor\Recovery::class, [R::GET, R::POST]],
  170. '/app_specific' => [Module\Settings\TwoFactor\AppSpecific::class, [R::GET, R::POST]],
  171. '/verify' => [Module\Settings\TwoFactor\Verify::class, [R::GET, R::POST]],
  172. ],
  173. ],
  174. '/randprof' => [Module\RandomProfile::class, [R::GET]],
  175. '/register' => [Module\Register::class, [R::GET, R::POST]],
  176. '/robots.txt' => [Module\RobotsTxt::class, [R::GET]],
  177. '/rsd.xml' => [Module\ReallySimpleDiscovery::class, [R::GET]],
  178. '/smilies[/json]' => [Module\Smilies::class, [R::GET]],
  179. '/statistics.json' => [Module\Statistics::class, [R::GET]],
  180. '/starred/{item:\d+}' => [Module\Starred::class, [R::GET]],
  181. '/toggle_mobile' => [Module\ToggleMobile::class, [R::GET]],
  182. '/tos' => [Module\Tos::class, [R::GET]],
  183. '/view/theme/{theme}/style.pcss' => [Module\Theme::class, [R::GET]],
  184. '/viewsrc/{item:\d+}' => [Module\Debug\ItemBody::class, [R::GET]],
  185. '/webfinger' => [Module\Debug\WebFinger::class, [R::GET]],
  186. '/xrd' => [Module\Xrd::class, [R::GET]],
  187. ];