s/access_ttl/download_ttl/ to match documentation
This commit is contained in:
parent
4ea4cfb025
commit
35007c7975
2
app.js
2
app.js
|
@ -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 })
|
||||
}
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue