mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-12 12:18:13 -05:00
7b9f9a487b
Signed-off-by: David Mehren <git@herrmehren.de>
15 lines
395 B
TypeScript
15 lines
395 B
TypeScript
import fs from 'fs'
|
|
|
|
function getFile (path): string {
|
|
if (fs.existsSync(path)) {
|
|
return path
|
|
}
|
|
return ''
|
|
}
|
|
|
|
export const defaultSSL = {
|
|
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')
|
|
}
|