mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 07:38:33 -04: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'
|
import fs from 'fs'
|
||||||
|
|
||||||
function getFile (path): string | undefined {
|
function getFile (path): string {
|
||||||
if (fs.existsSync(path)) {
|
if (fs.existsSync(path)) {
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
return undefined
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSSL = {
|
export const defaultSSL = {
|
||||||
|
|
|
@ -9,7 +9,7 @@ function getSecret (secret): string | undefined {
|
||||||
return 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)) {
|
if (fs.existsSync(basePath)) {
|
||||||
dockerSecret = {
|
dockerSecret = {
|
||||||
|
@ -17,7 +17,7 @@ if (fs.existsSync(basePath)) {
|
||||||
sessionSecret: getSecret('sessionsecret'),
|
sessionSecret: getSecret('sessionsecret'),
|
||||||
sslKeyPath: getSecret('sslkeypath'),
|
sslKeyPath: getSecret('sslkeypath'),
|
||||||
sslCertPath: getSecret('sslcertpath'),
|
sslCertPath: getSecret('sslcertpath'),
|
||||||
sslCAPath: getSecret('sslcapath'),
|
sslCAPath: [getSecret('sslcapath')],
|
||||||
dhParamPath: getSecret('dhparampath'),
|
dhParamPath: getSecret('dhparampath'),
|
||||||
s3: {
|
s3: {
|
||||||
accessKeyId: getSecret('s3_acccessKeyId'),
|
accessKeyId: getSecret('s3_acccessKeyId'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue