pixelfed.php 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Domains
  6. |--------------------------------------------------------------------------
  7. |
  8. | Application domains used for routing
  9. |
  10. */
  11. 'domain' => [
  12. 'admin' => env('ADMIN_DOMAIN'),
  13. 'app' => env('APP_DOMAIN'),
  14. ],
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Pixelfed Version
  18. |--------------------------------------------------------------------------
  19. |
  20. | This value is the version of your Pixelfed instance.
  21. |
  22. */
  23. 'version' => '0.11.9',
  24. /*
  25. |--------------------------------------------------------------------------
  26. | NodeInfo Route Path
  27. |--------------------------------------------------------------------------
  28. |
  29. | Do not change this value unless you know what you are doing.
  30. |
  31. */
  32. 'nodeinfo' => [
  33. 'url' => config('app.url').'/api/nodeinfo/2.0.json',
  34. ],
  35. /*
  36. |--------------------------------------------------------------------------
  37. | PHP/ImageMagic/GD Memory Limit
  38. |--------------------------------------------------------------------------
  39. |
  40. | This memory_limit value is only used for image processing. The
  41. | default memory_limit php.ini is used for the rest of the app.
  42. |
  43. */
  44. 'memory_limit' => env('MEMORY_LIMIT', '1024M'),
  45. /*
  46. |--------------------------------------------------------------------------
  47. | Allow New Registrations
  48. |--------------------------------------------------------------------------
  49. |
  50. | Enable/disable new local account registrations.
  51. |
  52. */
  53. 'open_registration' => env('OPEN_REGISTRATION', true),
  54. /*
  55. |--------------------------------------------------------------------------
  56. | Account file size limit
  57. |--------------------------------------------------------------------------
  58. |
  59. | Update the max account size, the per user limit of files in KB.
  60. |
  61. |
  62. */
  63. 'max_account_size' => env('MAX_ACCOUNT_SIZE', 1000000),
  64. /*
  65. |--------------------------------------------------------------------------
  66. | Photo file size limit
  67. |--------------------------------------------------------------------------
  68. |
  69. | Update the max photo size, in KB.
  70. |
  71. */
  72. 'max_photo_size' => env('MAX_PHOTO_SIZE', 15000),
  73. /*
  74. |--------------------------------------------------------------------------
  75. | Avatar file size limit
  76. |--------------------------------------------------------------------------
  77. |
  78. | Update the max avatar size, in KB.
  79. |
  80. */
  81. 'max_avatar_size' => (int) env('MAX_AVATAR_SIZE', 2000),
  82. /*
  83. |--------------------------------------------------------------------------
  84. | Caption limit
  85. |--------------------------------------------------------------------------
  86. |
  87. | Change the caption length limit for new local posts.
  88. |
  89. */
  90. 'max_caption_length' => env('MAX_CAPTION_LENGTH', 500),
  91. /*
  92. |--------------------------------------------------------------------------
  93. | Bio length limit
  94. |--------------------------------------------------------------------------
  95. |
  96. | Change the bio length limit for user profiles.
  97. |
  98. */
  99. 'max_bio_length' => env('MAX_BIO_LENGTH', 125),
  100. /*
  101. |--------------------------------------------------------------------------
  102. | User name length limit
  103. |--------------------------------------------------------------------------
  104. |
  105. | Change the length limit for user names.
  106. |
  107. */
  108. 'max_name_length' => env('MAX_NAME_LENGTH', 30),
  109. /*
  110. |--------------------------------------------------------------------------
  111. | Password minimum length limit
  112. |--------------------------------------------------------------------------
  113. |
  114. | Change the minimum length limit for user passwords.
  115. |
  116. */
  117. 'min_password_length' => env('MIN_PASSWORD_LENGTH', 8),
  118. /*
  119. |--------------------------------------------------------------------------
  120. | Album size limit
  121. |--------------------------------------------------------------------------
  122. |
  123. | The max number of photos allowed per post.
  124. |
  125. */
  126. 'max_album_length' => env('MAX_ALBUM_LENGTH', 4),
  127. /*
  128. |--------------------------------------------------------------------------
  129. | Email Verification
  130. |--------------------------------------------------------------------------
  131. |
  132. | Require email verification before a new user can do anything.
  133. |
  134. */
  135. 'enforce_email_verification' => env('ENFORCE_EMAIL_VERIFICATION', true),
  136. /*
  137. |--------------------------------------------------------------------------
  138. | Image Quality
  139. |--------------------------------------------------------------------------
  140. |
  141. | Set the image optimization quality, must be a value between 1-100.
  142. |
  143. */
  144. 'image_quality' => (int) env('IMAGE_QUALITY', 80),
  145. /*
  146. |--------------------------------------------------------------------------
  147. | Account deletion
  148. |--------------------------------------------------------------------------
  149. |
  150. | Enable account deletion.
  151. |
  152. */
  153. 'account_deletion' => env('ACCOUNT_DELETION', true),
  154. /*
  155. |--------------------------------------------------------------------------
  156. | Account deletion after X days
  157. |--------------------------------------------------------------------------
  158. |
  159. | Set account deletion queue after X days, set to false to delete accounts
  160. | immediately.
  161. |
  162. */
  163. 'account_delete_after' => env('ACCOUNT_DELETE_AFTER', false),
  164. /*
  165. |--------------------------------------------------------------------------
  166. | Enable Cloud Storage
  167. |--------------------------------------------------------------------------
  168. |
  169. | Store media on object storage like S3, Digital Ocean Spaces, Rackspace
  170. |
  171. */
  172. 'cloud_storage' => env('PF_ENABLE_CLOUD', false),
  173. /*
  174. |--------------------------------------------------------------------------
  175. | Max User Limit
  176. |--------------------------------------------------------------------------
  177. |
  178. | Allow a maximum number of user accounts. Default: off
  179. |
  180. */
  181. 'max_users' => env('PF_MAX_USERS', 1000),
  182. 'enforce_max_users' => env('PF_ENFORCE_MAX_USERS', true),
  183. /*
  184. |--------------------------------------------------------------------------
  185. | Optimize Images
  186. |--------------------------------------------------------------------------
  187. |
  188. | Resize and optimize image uploads. Default: on
  189. |
  190. */
  191. 'optimize_image' => env('PF_OPTIMIZE_IMAGES', true),
  192. /*
  193. |--------------------------------------------------------------------------
  194. | Optimize Videos
  195. |--------------------------------------------------------------------------
  196. |
  197. | Resize and optimize video uploads. Default: on
  198. |
  199. */
  200. 'optimize_video' => env('PF_OPTIMIZE_VIDEOS', true),
  201. /*
  202. |--------------------------------------------------------------------------
  203. | User invites
  204. |--------------------------------------------------------------------------
  205. |
  206. | Allow users to invite others via email.
  207. | Will respect max user limit and prevent invites after the
  208. | limit is reached. Default: off
  209. |
  210. */
  211. 'user_invites' => [
  212. 'enabled' => env('PF_USER_INVITES', false),
  213. 'limit' => [
  214. 'total' => (int) env('PF_USER_INVITES_TOTAL_LIMIT', 0),
  215. 'daily' => (int) env('PF_USER_INVITES_DAILY_LIMIT', 0),
  216. 'monthly' => (int) env('PF_USER_INVITES_MONTHLY_LIMIT', 0),
  217. ]
  218. ],
  219. 'max_collection_length' => (int) env('PF_MAX_COLLECTION_LENGTH', 100),
  220. 'media_types' => env('MEDIA_TYPES', 'image/jpeg,image/png,image/gif'),
  221. 'enforce_account_limit' => env('LIMIT_ACCOUNT_SIZE', true),
  222. 'import' => [
  223. 'instagram' => [
  224. 'enabled' => env('IMPORT_INSTAGRAM', false),
  225. 'limits' => [
  226. 'posts' => (int) env('IMPORT_INSTAGRAM_POST_LIMIT', 100),
  227. 'size' => (int) env('IMPORT_INSTAGRAM_SIZE_LIMIT', 5000)
  228. ]
  229. ]
  230. ],
  231. 'oauth_enabled' => env('OAUTH_ENABLED', true),
  232. 'bouncer' => [
  233. 'enabled' => env('PF_BOUNCER_ENABLED', false),
  234. 'cloud_ips' => [
  235. 'ban_logins' => env('PF_BOUNCER_BAN_CLOUD_LOGINS', false),
  236. 'ban_signups' => env('PF_BOUNCER_BAN_CLOUD_SIGNUPS', false),
  237. 'ban_api' => env('PF_BOUNCER_BAN_CLOUD_API', false),
  238. 'ban_api_strict_mode' => env('PF_BOUNCER_BAN_CLOUD_API_STRICT_MODE', false),
  239. ],
  240. ],
  241. /*
  242. |--------------------------------------------------------------------------
  243. | Media Fast Process
  244. |--------------------------------------------------------------------------
  245. |
  246. | Don't require photos & video to finish optimization &
  247. | upload to S3 if enabled before posting. If disabled
  248. | users will have to wait until processed before posting,
  249. | sacrificing the user experience to ensure media is federated
  250. | using S3 urls (if enabled). Default: off
  251. |
  252. */
  253. 'media_fast_process' => env('PF_MEDIA_FAST_PROCESS', true),
  254. 'max_altext_length' => env('PF_MEDIA_MAX_ALTTEXT_LENGTH', 1000),
  255. 'allow_app_registration' => env('PF_ALLOW_APP_REGISTRATION', true),
  256. 'app_registration_rate_limit_attempts' => env('PF_IAR_RL_ATTEMPTS', 3),
  257. 'app_registration_rate_limit_decay' => env('PF_IAR_RL_DECAY', 1800),
  258. 'app_registration_confirm_rate_limit_attempts' => env('PF_IARC_RL_ATTEMPTS', 20),
  259. 'app_registration_confirm_rate_limit_decay' => env('PF_IARC_RL_ATTEMPTS', 1800),
  260. ];