const path = require('path')
// ---------------------------------------------------------------------------
const path = require('path')
// ---------------------------------------------------------------------------
- USERS: [ 'username', '-username', 'createdAt', '-createdAt' ],
+ USERS: [ 'id', '-id', 'username', '-username', 'createdAt', '-createdAt' ],
+ VIDEO_ABUSES: [ 'id', '-id', 'createdAt', '-createdAt' ],
VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdAt', '-createdAt' ]
}
VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdAt', '-createdAt' ]
}
WS: config.get('webserver.https') === true ? 'wss' : 'ws',
HOSTNAME: config.get('webserver.hostname'),
PORT: config.get('webserver.port')
WS: config.get('webserver.https') === true ? 'wss' : 'ws',
HOSTNAME: config.get('webserver.hostname'),
PORT: config.get('webserver.port')
USERNAME: { min: 3, max: 20 }, // Length
PASSWORD: { min: 6, max: 255 } // Length
},
USERNAME: { min: 3, max: 20 }, // Length
PASSWORD: { min: 6, max: 255 } // Length
},
VIDEOS: {
NAME: { min: 3, max: 50 }, // Length
DESCRIPTION: { min: 3, max: 250 }, // Length
EXTNAME: [ '.mp4', '.ogv', '.webm' ],
VIDEOS: {
NAME: { min: 3, max: 50 }, // Length
DESCRIPTION: { min: 3, max: 250 }, // Length
EXTNAME: [ '.mp4', '.ogv', '.webm' ],
- INFO_HASH: { min: 10, max: 50 }, // Length
+ INFO_HASH: { min: 40, max: 40 }, // Length, infohash is 20 bytes length but we represent it in hexa so 20 * 2
DURATION: { min: 1, max: 7200 }, // Number
TAGS: { min: 1, max: 3 }, // Number of total tags
TAG: { min: 2, max: 10 }, // Length
THUMBNAIL: { min: 2, max: 30 },
DURATION: { min: 1, max: 7200 }, // Number
TAGS: { min: 1, max: 3 }, // Number of total tags
TAG: { min: 2, max: 10 }, // Length
THUMBNAIL: { min: 2, max: 30 },
-// How many requests we put in request
-const REQUESTS_LIMIT = 10
+// To how many pods we send requests
+const REQUESTS_LIMIT_PODS = 10
+// How many requests we send to a pod per interval
+const REQUESTS_LIMIT_PER_POD = 5
-
-// ---------------------------------------------------------------------------
+const REQUEST_ENDPOINT_ACTIONS = {}
+REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
+ ADD: 'add',
+ UPDATE: 'update',
+ REMOVE: 'remove',
+ REPORT_ABUSE: 'report-abuse'
+}
+// ---------------------------------------------------------------------------
+
+const PRIVATE_CERT_NAME = 'peertube.key.pem'
+const PUBLIC_CERT_NAME = 'peertube.pub'
+const SIGNATURE_ALGORITHM = 'RSA-SHA256'
+const SIGNATURE_ENCODING = 'hex'
+
// Express static paths (router)
const STATIC_PATHS = {
PREVIEWS: '/static/previews/',
// Express static paths (router)
const STATIC_PATHS = {
PREVIEWS: '/static/previews/',