2019-09-04 19:18:47 +02:00
{
2020-03-27 02:58:21 +01:00
// Remove all comments from the config when using it!
2019-09-04 19:41:07 +02:00
"port": 80,
2019-09-04 19:18:47 +02:00
"globalSalt": "[global salt (pepper) that is added to every ip before hashing to make it even harder for someone to decode the ip]",
"adminUserID": "[the hashed id of the user who can perform admin actions]",
2021-06-03 17:38:21 +02:00
"newLeafURLs": ["http://localhost:3241"],
2019-12-24 16:53:20 +01:00
"discordReportChannelWebhookURL": null, //URL from discord if you would like notifications when someone makes a report [optional]
2019-12-28 06:29:14 +01:00
"discordFirstTimeSubmissionsWebhookURL": null, //URL from discord if you would like notifications when someone makes a first time submission [optional]
2020-04-28 05:01:51 +02:00
"discordCompletelyIncorrectReportWebhookURL": null, //URL from discord if you would like notifications when someone reports a submission as completely incorrect [optional]
2020-05-03 17:49:04 +02:00
"neuralBlockURL": null, // URL to check submissions against neural block. Ex. https://ai.neuralblock.app
2020-09-05 22:56:23 +02:00
"discordNeuralBlockRejectWebhookURL": null, //URL from discord if you would like notifications when NeuralBlock rejects a submission [optional]
2020-08-30 17:17:26 +02:00
"userCounterURL": null, // For user counting. URL to instance of https://github.com/ajayyy/PrivacyUserCount
2020-07-27 06:53:16 +02:00
"proxySubmission": null, // Base url to proxy submissions to persist // e.g. https://sponsor.ajay.app (no trailing slash)
2020-04-30 06:34:34 +02:00
"behindProxy": "X-Forwarded-For", //Options: "X-Forwarded-For", "Cloudflare", "X-Real-IP", anything else will mean it is not behind a proxy. True defaults to "X-Forwarded-For"
2019-10-28 21:37:08 +01:00
"db": "./databases/sponsorTimes.db",
"privateDB": "./databases/private.db",
2020-02-15 22:02:56 +01:00
"createDatabaseIfNotExist": true, //This will run on startup every time (unless readOnly is true) - so ensure "create table if not exists" is used in the schema
2020-04-28 05:01:51 +02:00
"schemaFolder": "./databases",
2020-02-13 01:03:09 +01:00
"dbSchema": "./databases/_sponsorTimes.db.sql",
"privateDBSchema": "./databases/_private.db.sql",
2021-06-29 22:03:40 +02:00
// when using redis, add `"enable_offline_queue": false` to force commands to fail instead of timing out
2019-10-28 21:37:08 +01:00
"mode": "development",
2020-08-23 20:54:18 +02:00
"readOnly": false,
2020-09-09 16:40:13 +02:00
"webhooks": [],
2021-08-18 04:01:12 +02:00
"categoryList": ["sponsor", "intro", "outro", "interaction", "selfpromo", "preview", "music_offtopic", "poi_highlight"], // List of supported categories any other category will be rejected
2020-10-15 00:35:15 +02:00
"getTopUsersCacheTimeMinutes": 5, // cacheTime for getTopUsers result in minutes
2020-09-16 22:40:11 +02:00
"maxNumberOfActiveWarnings": 3, // Users with this number of warnings will be blocked until warnings expire
2020-10-15 00:34:27 +02:00
"hoursAfterWarningExpire": 24,
2020-10-11 16:17:17 +02:00
"rateLimit": {
"vote": {
"windowMs": 900000, // 15 minutes
"max": 20, // 20 requests in 15min time window
2020-10-11 19:07:57 +02:00
"message": "Too many votes, please try again later",
2020-10-11 19:14:52 +02:00
"statusCode": 429
2020-10-11 19:07:57 +02:00
},
"view": {
"windowMs": 900000, // 15 minutes
"max": 20, // 20 requests in 15min time window
"statusCode": 200
2020-10-11 16:17:17 +02:00
}
2021-02-26 01:57:45 +01:00
},
2021-04-18 21:47:42 +02:00
"maxRewardTimePerSegmentInSeconds": 86400, // maximum time a user get rewarded in the leaderboard for a single segment
2021-03-21 22:40:57 +01:00
"dumpDatabase": {
"enabled": true,
"minTimeBetweenMs": 60000, // 1 minute between dumps
2021-04-18 05:09:21 +02:00
"appExportPath": "./docker/database-export",
2021-03-22 22:18:23 +01:00
"postgresExportPath": "/opt/exports",
2021-03-21 22:40:57 +01:00
"tables": [{
"name": "sponsorTimes",
"order": "timeSubmitted"
},
{
"name": "userNames"
},
{
"name": "categoryVotes"
},
{
2021-04-24 01:54:42 +02:00
"name": "lockCategories"
2021-03-21 22:40:57 +01:00
},
{
"name": "warnings",
"order": "issueTime"
},
{
"name": "vipUsers"
}]
2022-12-18 05:35:13 +01:00
},
"minUserIDLength": 30 // minimum length of UserID to be accepted
2020-02-13 01:03:09 +01:00
}