instance.php 5.9 KB

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