mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-27 00:53:33 +00:00
config/: Cleanups in defaultSSL.ts and dockerSecret.ts
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
ad0b0834e5
commit
37c2cd0731
2 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
import fs from 'fs'
|
||||
|
||||
function getFile (path): string | undefined {
|
||||
function getFile (path): string {
|
||||
if (fs.existsSync(path)) {
|
||||
return path
|
||||
}
|
||||
return undefined
|
||||
return ''
|
||||
}
|
||||
|
||||
export const defaultSSL = {
|
||||
|
|
|
@ -9,7 +9,7 @@ function getSecret (secret): string | undefined {
|
|||
return undefined
|
||||
}
|
||||
|
||||
export let dockerSecret: { s3: { accessKeyId: string | undefined; secretAccessKey: string | undefined }; github: { clientID: string | undefined; clientSecret: string | undefined }; facebook: { clientID: string | undefined; clientSecret: string | undefined }; google: { clientID: string | undefined; hostedDomain: string | undefined; clientSecret: string | undefined }; sessionSecret: string | undefined; sslKeyPath: string | undefined; twitter: { consumerSecret: string | undefined; consumerKey: string | undefined }; dropbox: { clientID: string | undefined; clientSecret: string | undefined; appKey: string | undefined }; gitlab: { clientID: string | undefined; clientSecret: string | undefined }; imgur: string | undefined; sslCertPath: string | undefined; sslCAPath: string | undefined; dhParamPath: string | undefined; dbURL: string | undefined; azure: { connectionString: string | undefined } }
|
||||
export let dockerSecret: { s3: { accessKeyId: string | undefined; secretAccessKey: string | undefined }; github: { clientID: string | undefined; clientSecret: string | undefined }; facebook: { clientID: string | undefined; clientSecret: string | undefined }; google: { clientID: string | undefined; hostedDomain: string | undefined; clientSecret: string | undefined }; sessionSecret: string | undefined; sslKeyPath: string | undefined; twitter: { consumerSecret: string | undefined; consumerKey: string | undefined }; dropbox: { clientID: string | undefined; clientSecret: string | undefined; appKey: string | undefined }; gitlab: { clientID: string | undefined; clientSecret: string | undefined }; imgur: string | undefined; sslCertPath: string | undefined; sslCAPath: (string | undefined)[]; dhParamPath: string | undefined; dbURL: string | undefined; azure: { connectionString: string | undefined } }
|
||||
|
||||
if (fs.existsSync(basePath)) {
|
||||
dockerSecret = {
|
||||
|
@ -17,7 +17,7 @@ if (fs.existsSync(basePath)) {
|
|||
sessionSecret: getSecret('sessionsecret'),
|
||||
sslKeyPath: getSecret('sslkeypath'),
|
||||
sslCertPath: getSecret('sslcertpath'),
|
||||
sslCAPath: getSecret('sslcapath'),
|
||||
sslCAPath: [getSecret('sslcapath')],
|
||||
dhParamPath: getSecret('dhparampath'),
|
||||
s3: {
|
||||
accessKeyId: getSecret('s3_acccessKeyId'),
|
||||
|
|
Loading…
Reference in a new issue