instance.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. return [
  3. 'force_https_urls' => env('FORCE_HTTPS_URLS', true),
  4. 'description' => env('INSTANCE_DESCRIPTION', 'Pixelfed - Photo sharing for everyone'),
  5. 'contact' => [
  6. 'enabled' => env('INSTANCE_CONTACT_FORM', false),
  7. 'max_per_day' => env('INSTANCE_CONTACT_MAX_PER_DAY', 1),
  8. ],
  9. 'discover' => [
  10. 'public' => env('INSTANCE_DISCOVER_PUBLIC', false),
  11. 'loops' => [
  12. 'enabled' => env('EXP_LOOPS', false),
  13. ],
  14. 'tags' => [
  15. 'is_public' => env('INSTANCE_PUBLIC_HASHTAGS', false),
  16. ],
  17. 'beagle_api' => env('PF_INSTANCE_USE_BEAGLE_API', true),
  18. ],
  19. 'email' => env('INSTANCE_CONTACT_EMAIL'),
  20. 'timeline' => [
  21. 'home' => [
  22. 'cached' => env('PF_HOME_TIMELINE_CACHE', false),
  23. 'cache_ttl' => env('PF_HOME_TIMELINE_CACHE_TTL', 900),
  24. ],
  25. 'local' => [
  26. 'cached' => env('INSTANCE_PUBLIC_TIMELINE_CACHED', false),
  27. 'is_public' => env('INSTANCE_PUBLIC_LOCAL_TIMELINE', false),
  28. ],
  29. 'network' => [
  30. 'cached' => env('PF_NETWORK_TIMELINE') ? env('INSTANCE_NETWORK_TIMELINE_CACHED', false) : false,
  31. 'cache_dropoff' => env('INSTANCE_NETWORK_TIMELINE_CACHE_DROPOFF', 100),
  32. 'max_hours_old' => env('INSTANCE_NETWORK_TIMELINE_CACHE_MAX_HOUR_INGEST', 2160),
  33. ],
  34. ],
  35. 'page' => [
  36. '404' => [
  37. 'header' => env('PAGE_404_HEADER', 'Sorry, this page isn\'t available.'),
  38. 'body' => env('PAGE_404_BODY', 'The link you followed may be broken, or the page may have been removed. <a href="/">Go back to Pixelfed.</a>'),
  39. ],
  40. '503' => [
  41. 'header' => env('PAGE_503_HEADER', 'Service Unavailable'),
  42. 'body' => env('PAGE_503_BODY', 'Our service is in maintenance mode, please try again later.'),
  43. ],
  44. ],
  45. 'username' => [
  46. 'banned' => env('BANNED_USERNAMES'),
  47. 'remote' => [
  48. 'formats' => ['@', 'from', 'custom'],
  49. 'format' => in_array(env('USERNAME_REMOTE_FORMAT', '@'), ['@', 'from', 'custom']) ? env('USERNAME_REMOTE_FORMAT', '@') : '@',
  50. 'custom' => env('USERNAME_REMOTE_CUSTOM_TEXT', null),
  51. ],
  52. ],
  53. 'polls' => [
  54. 'enabled' => false,
  55. ],
  56. 'stories' => [
  57. 'enabled' => env('STORIES_ENABLED', false),
  58. ],
  59. 'restricted' => [
  60. 'enabled' => env('RESTRICTED_INSTANCE', false),
  61. 'level' => 1,
  62. ],
  63. 'oauth' => [
  64. 'token_expiration' => env('OAUTH_TOKEN_DAYS', 365),
  65. 'refresh_expiration' => env('OAUTH_REFRESH_DAYS', 400),
  66. 'pat' => [
  67. 'enabled' => env('OAUTH_PAT_ENABLED', false),
  68. 'id' => env('OAUTH_PAT_ID'),
  69. ],
  70. ],
  71. 'label' => [
  72. 'covid' => [
  73. 'enabled' => env('ENABLE_COVID_LABEL', true),
  74. 'url' => env('COVID_LABEL_URL', 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public'),
  75. 'org' => env('COVID_LABEL_ORG', 'visit the WHO website'),
  76. ],
  77. ],
  78. 'enable_cc' => env('ENABLE_CONFIG_CACHE', true),
  79. 'has_legal_notice' => env('INSTANCE_LEGAL_NOTICE', false),
  80. 'embed' => [
  81. 'profile' => env('INSTANCE_PROFILE_EMBEDS', true),
  82. 'post' => env('INSTANCE_POST_EMBEDS', true),
  83. ],
  84. 'hide_nsfw_on_public_feeds' => env('PF_HIDE_NSFW_ON_PUBLIC_FEEDS', false),
  85. 'avatar' => [
  86. 'local_to_cloud' => env('PF_LOCAL_AVATAR_TO_CLOUD', false),
  87. ],
  88. 'admin_invites' => [
  89. 'enabled' => env('PF_ADMIN_INVITES_ENABLED', true),
  90. ],
  91. 'user_filters' => [
  92. 'max_user_blocks' => env('PF_MAX_USER_BLOCKS', 50),
  93. 'max_user_mutes' => env('PF_MAX_USER_MUTES', 50),
  94. 'max_domain_blocks' => env('PF_MAX_DOMAIN_BLOCKS', 50),
  95. ],
  96. 'reports' => [
  97. 'email' => [
  98. 'enabled' => env('INSTANCE_REPORTS_EMAIL_ENABLED', false),
  99. 'to' => env('INSTANCE_REPORTS_EMAIL_ADDRESSES'),
  100. 'autospam' => env('INSTANCE_REPORTS_EMAIL_AUTOSPAM', false),
  101. ],
  102. ],
  103. 'landing' => [
  104. 'show_directory' => env('INSTANCE_LANDING_SHOW_DIRECTORY', true),
  105. 'show_explore' => env('INSTANCE_LANDING_SHOW_EXPLORE', true),
  106. ],
  107. 'banner' => [
  108. 'blurhash' => env('INSTANCE_BANNER_BLURHASH', 'UzJR]l{wHZRjM}R%XRkCH?X9xaWEjZj]kAjt'),
  109. ],
  110. 'parental_controls' => [
  111. 'enabled' => env('INSTANCE_PARENTAL_CONTROLS', false),
  112. 'limits' => [
  113. 'respect_open_registration' => env('INSTANCE_PARENTAL_CONTROLS_RESPECT_OPENREG', true),
  114. 'max_children' => env('INSTANCE_PARENTAL_CONTROLS_MAX_CHILDREN', 1),
  115. 'auto_verify_email' => true,
  116. ],
  117. ],
  118. 'software-update' => [
  119. 'disable_failed_warning' => env('INSTANCE_SOFTWARE_UPDATE_DISABLE_FAILED_WARNING', false),
  120. ],
  121. 'notifications' => [
  122. 'gc' => [
  123. 'enabled' => env('INSTANCE_NOTIFY_AUTO_GC', false),
  124. 'delete_after_days' => env('INSTANCE_NOTIFY_AUTO_GC_DEL_AFTER_DAYS', 365),
  125. ],
  126. 'nag' => [
  127. 'enabled' => (bool) env('INSTANCE_NOTIFY_APP_GATEWAY', true),
  128. 'api_key' => env('PIXELFED_PUSHGATEWAY_KEY', false),
  129. 'endpoint' => 'push.pixelfed.net',
  130. ],
  131. ],
  132. 'curated_registration' => [
  133. 'enabled' => env('INSTANCE_CUR_REG', false),
  134. 'resend_confirmation_limit' => env('INSTANCE_CUR_REG_RESEND_LIMIT', 5),
  135. 'captcha_enabled' => env('INSTANCE_CUR_REG_CAPTCHA', env('CAPTCHA_ENABLED', false)),
  136. 'state' => [
  137. 'fallback_on_closed_reg' => true,
  138. 'only_enabled_on_closed_reg' => env('INSTANCE_CUR_REG_STATE_ONLY_ON_CLOSED', true),
  139. ],
  140. 'notify' => [
  141. 'admin' => [
  142. 'on_verify_email' => [
  143. 'enabled' => env('INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_VERIFY', false),
  144. 'bundle' => env('INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_VERIFY_BUNDLE', false),
  145. 'max_per_day' => env('INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_VERIFY_MPD', 10),
  146. 'cc_addresses' => env('INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_VERIFY_CC'),
  147. ],
  148. 'on_user_response' => env('INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_USER_RESPONSE', false),
  149. ],
  150. ],
  151. ],
  152. 'show_peers' => env('INSTANCE_SHOW_PEERS', false),
  153. 'allow_new_account_dms' => env('INSTANCE_ALLOW_NEW_DMS', true),
  154. ];