config.sample.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. '.sh'
  33. ],
  34. // Uploads config
  35. uploads: {
  36. // Folder where images should be stored
  37. folder: 'uploads',
  38. // Max file size allowed. Needs to be in MB
  39. // Note: When maxSize is greater than 1 MiB,
  40. // you must set the client_max_body_size
  41. // to the same as maxSize.
  42. maxSize: '512MB',
  43. // The length of the random generated name for the uploaded files
  44. fileLength: 32,
  45. // NOTE: Thumbnails are only for the admin panel and they require you
  46. // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  47. // for images and FFmpeg (https://ffmpeg.org/) for video files
  48. generateThumbnails: false
  49. },
  50. // Folder where to store logs
  51. logsFolder: 'logs',
  52. // The following values shouldn't be touched
  53. database: {
  54. client: 'sqlite3',
  55. connection: {
  56. filename: './database/db'
  57. },
  58. useNullAsDefault: true
  59. }
  60. }