2017-01-13 07:48:18 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2017-01-18 23:37:53 +00:00
|
|
|
/*
|
|
|
|
If set to true the user will need to specify the auto-generated token
|
|
|
|
on each API call, meaning random strangers wont be able to use the service
|
|
|
|
unless they have the token loli-safe provides you with.
|
|
|
|
If it's set to false, then upload will be public for anyone to use.
|
|
|
|
*/
|
2017-01-17 03:37:54 +00:00
|
|
|
private: true,
|
2017-10-03 22:48:26 +00:00
|
|
|
|
2017-01-30 08:10:13 +00:00
|
|
|
// If true, users will be able to create accounts and access their uploaded files
|
|
|
|
enableUserAccounts: true,
|
2017-01-18 23:37:53 +00:00
|
|
|
|
2017-10-03 22:48:26 +00:00
|
|
|
/*
|
|
|
|
Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx.
|
|
|
|
The main difference between the two is the ease of use and the chance of analytics in the future.
|
|
|
|
If you set it to `true`, the uploaded files will be located after the host like:
|
|
|
|
https://lolisafe.moe/yourFile.jpg
|
2017-01-19 00:35:31 +00:00
|
|
|
|
2017-10-04 00:13:03 +00:00
|
|
|
If you set it to `false`, you need to set nginx to directly serve whatever folder it is you are serving your
|
|
|
|
downloads in. This also gives you the ability to serve them, for example, like this:
|
2017-10-03 22:48:26 +00:00
|
|
|
https://files.lolisafe.moe/yourFile.jpg
|
2017-01-19 03:31:01 +00:00
|
|
|
|
2017-10-04 00:13:03 +00:00
|
|
|
Both cases require you to type the domain where the files will be served on the `domain` key below.
|
|
|
|
Which one you use is ultimately up to you.
|
2017-10-03 22:48:26 +00:00
|
|
|
*/
|
|
|
|
serveFilesWithNode: false,
|
2017-10-04 00:13:03 +00:00
|
|
|
domain: 'https://lolisafe.moe',
|
2017-01-14 23:47:50 +00:00
|
|
|
|
2017-01-13 07:48:18 +00:00
|
|
|
// Port on which to run the server
|
|
|
|
port: 9999,
|
|
|
|
|
2017-02-06 03:06:33 +00:00
|
|
|
// Pages to process for the frontend
|
|
|
|
pages: ['home', 'auth', 'dashboard', 'faq'],
|
|
|
|
|
2017-03-27 21:07:00 +00:00
|
|
|
// Add file extensions here which should be blocked
|
|
|
|
blockedExtensions: [
|
2018-03-09 20:27:09 +00:00
|
|
|
'.jar',
|
2017-03-27 21:07:00 +00:00
|
|
|
'.exe',
|
2018-03-06 21:29:40 +00:00
|
|
|
'.msi',
|
|
|
|
'.com',
|
2017-03-27 21:07:00 +00:00
|
|
|
'.bat',
|
|
|
|
'.cmd',
|
2018-03-09 20:27:09 +00:00
|
|
|
'.scr',
|
2018-03-06 21:29:40 +00:00
|
|
|
'.ps1',
|
2017-03-29 20:54:45 +00:00
|
|
|
'.sh'
|
2017-03-27 21:07:00 +00:00
|
|
|
],
|
|
|
|
|
2017-01-13 07:48:18 +00:00
|
|
|
// Uploads config
|
|
|
|
uploads: {
|
|
|
|
|
|
|
|
// Folder where images should be stored
|
|
|
|
folder: 'uploads',
|
|
|
|
|
2017-10-03 22:48:26 +00:00
|
|
|
/*
|
|
|
|
Max file size allowed. Needs to be in MB
|
|
|
|
Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
|
|
|
|
*/
|
2017-01-18 23:37:53 +00:00
|
|
|
maxSize: '512MB',
|
2017-01-14 08:50:18 +00:00
|
|
|
|
|
|
|
// The length of the random generated name for the uploaded files
|
2017-01-16 08:22:19 +00:00
|
|
|
fileLength: 32,
|
2017-01-22 21:01:39 +00:00
|
|
|
|
2018-03-18 12:21:04 +00:00
|
|
|
/*
|
|
|
|
This option will limit how many times it will try to generate random names
|
|
|
|
for uploaded files. If this value is higher than 1, it will help in cases
|
|
|
|
where files with the same name already exists (higher chance with shorter file name length).
|
|
|
|
*/
|
|
|
|
maxTries: 1,
|
|
|
|
|
2017-10-03 22:48:26 +00:00
|
|
|
/*
|
|
|
|
NOTE: Thumbnails are only for the admin panel and they require you
|
|
|
|
to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
|
|
|
|
for images and ffmpeg (https://ffmpeg.org/) for video files
|
|
|
|
*/
|
2017-10-04 05:05:38 +00:00
|
|
|
generateThumbnails: false,
|
|
|
|
|
|
|
|
/*
|
|
|
|
Allows users to download a .zip file of all files in an album.
|
|
|
|
The file is generated when the user clicks the download button in the view
|
|
|
|
and is re-used if the album has not changed between download requests
|
|
|
|
*/
|
|
|
|
generateZips: true
|
2017-01-13 07:48:18 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// Folder where to store logs
|
|
|
|
logsFolder: 'logs',
|
|
|
|
|
|
|
|
// The following values shouldn't be touched
|
|
|
|
database: {
|
|
|
|
client: 'sqlite3',
|
2017-10-03 22:48:26 +00:00
|
|
|
connection: { filename: './database/db' },
|
2017-01-13 07:48:18 +00:00
|
|
|
useNullAsDefault: true
|
|
|
|
}
|
2017-01-14 19:23:54 +00:00
|
|
|
}
|