show id card photo image on customer page (#155)

This commit is contained in:
Fabio Cigliano 2018-08-30 17:54:41 +02:00 committed by Josh Harvey
parent c559a998aa
commit fe72eb8e7f
4 changed files with 657 additions and 454 deletions

View file

@ -36,6 +36,7 @@ const supportServer = require('./admin-support')
const NEVER = new Date(Date.now() + 100 * T.years)
const REAUTHENTICATE_INTERVAL = T.minute
const idPhotoCardBasedir = _.get('idPhotoCardDir', options)
const devMode = argv.dev
@ -249,6 +250,10 @@ const certOptions = {
app.use(serveStatic(path.resolve(__dirname, '..', '..', 'public')))
if (fs.existsSync(idPhotoCardBasedir)) {
app.use('/id-card-photo', serveStatic(idPhotoCardBasedir, {index: false}))
}
function register (req, res, next) {
const otp = req.query.otp