config.sample.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. module.exports = {
  2. /*
  3. If set to true the user will need to specify the auto-generated token
  4. on each API call, meaning random strangers wont be able to use the service
  5. unless they have the token loli-safe provides you with.
  6. If it's set to false, then upload will be public for anyone to use.
  7. */
  8. private: true,
  9. // If true, users will be able to create accounts and access their uploaded files
  10. enableUserAccounts: true,
  11. // The registered domain where you will be serving the app. Use IP if none.
  12. domains: [
  13. /*
  14. You need to specify the base domain where loli-self is running
  15. and how should it resolve the URL for uploaded files. For example:
  16. */
  17. // Files will be served at http(s)://i.kanacchi.moe/Fxt0.png
  18. { host: 'kanacchi.moe', resolve: 'https://i.kanacchi.moe'},
  19. // Files will be served at https://my.kanacchi.moe/loli-self/files/Fxt0.png
  20. { host: 'kanacchi.moe', resolve: 'https://my.kanacchi.moe/loli-self/files' }
  21. ],
  22. // Port on which to run the server
  23. port: 9999,
  24. // Pages to process for the frontend
  25. pages: ['home', 'auth', 'dashboard', 'faq'],
  26. // Add file extensions here which should be blocked
  27. blockedExtensions: [
  28. '.exe',
  29. '.bat',
  30. '.cmd',
  31. '.msi'
  32. ],
  33. // Uploads config
  34. uploads: {
  35. // Folder where images should be stored
  36. folder: 'uploads',
  37. // Max file size allowed. Needs to be in MB
  38. // Note: When maxSize is greater than 1 MiB,
  39. // you must set the client_max_body_size
  40. // to the same as maxSize.
  41. maxSize: '512MB',
  42. // The length of the random generated name for the uploaded files
  43. fileLength: 32,
  44. // NOTE: Thumbnails are only for the admin panel and they require you
  45. // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  46. // for images and FFmpeg (https://ffmpeg.org/) for video files
  47. generateThumbnails: false
  48. },
  49. // Folder where to store logs
  50. logsFolder: 'logs',
  51. // The following values shouldn't be touched
  52. database: {
  53. client: 'sqlite3',
  54. connection: {
  55. filename: './database/db'
  56. },
  57. useNullAsDefault: true
  58. }
  59. }