mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-30 20:01:08 -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')
|
|
}
|