mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 20:14:31 -05:00
17 lines
404 B
JavaScript
17 lines
404 B
JavaScript
'use strict'
|
|
|
|
const fs = require('fs')
|
|
|
|
function getFile (path) {
|
|
if (fs.existsSync(path)) {
|
|
return path
|
|
}
|
|
return undefined
|
|
}
|
|
|
|
module.exports = {
|
|
sslkeypath: getFile('/run/secrets/key.pem'),
|
|
sslcertpath: getFile('/run/secrets/cert.pem'),
|
|
sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
|
dhparampath: getFile('/run/secrets/dhparam.pem')
|
|
}
|