s/access_ttl/download_ttl/ to match documentation

This commit is contained in:
Nadav Ivgi 2017-12-17 20:12:24 +02:00
parent 4ea4cfb025
commit 35007c7975
2 changed files with 15 additions and 15 deletions

2
app.js
View File

@ -74,7 +74,7 @@ app.get('/:rpath(*)', pwrap(async (req, res) => {
}
else if (invoice) {
if (invoice.completed) res.redirect(escape(file.name) + '?token=' + tokenr.make(invoice, conf.access_ttl))
if (invoice.completed) res.redirect(escape(file.name) + '?token=' + tokenr.make(invoice, conf.download_ttl))
else res.render('file', { ...file, invoice })
}

View File

@ -23,7 +23,7 @@ module.exports = basePath => {
config.kite_token = config.kite_token || process.env.KITE_TOKEN
config.invoice_ttl = config.invoice_ttl || +process.env.INVOICE_TTL || 3600 // 1 hour
config.access_ttl = config.access_ttl || +process.env.ACCESS_TTL || 172800 // 2 days
config.download_ttl = config.download_ttl || +process.env.DOWNLOAD_TTL || 172800 // 2 days
config.views_dir = config.views_dir || process.env.VIEWS_DIR || path.join(__dirname, '..', 'views')
config.static_dir = config.static_dir || process.env.STATIC_DIR || path.join(__dirname, '..', 'static')