made download count and expiry options server configurable

This commit is contained in:
Danny Coates 2018-09-24 15:08:39 -07:00
parent b61bf3c867
commit e2259ae737
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
6 changed files with 22 additions and 28 deletions

View file

@ -9,16 +9,6 @@ const conf = convict({
default: '',
env: 'S3_BUCKET'
},
num_of_prefixes: {
format: Number,
default: 5,
env: 'NUM_OF_PREFIXES'
},
expire_prefixes: {
format: Array,
default: ['5minutes', '1hour', '1day', '1week', '2weeks'],
env: 'EXPIRE_PREFIXES'
},
expire_times_seconds: {
format: Array,
default: [300, 3600, 86400, 604800],
@ -39,6 +29,11 @@ const conf = convict({
default: 86400,
env: 'ANON_MAX_EXPIRE_SECONDS'
},
download_counts: {
format: Array,
default: [1, 2, 3, 4, 5, 20, 50, 100, 200],
env: 'DOWNLOAD_COUNTS'
},
max_downloads: {
format: Number,
default: 200,