2017-04-12 17:57:55 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
domain: '',
|
2018-03-07 14:17:35 +00:00
|
|
|
urlPath: '',
|
2017-04-12 17:57:55 +00:00
|
|
|
port: 3000,
|
2018-03-07 14:17:35 +00:00
|
|
|
urlAddPort: false,
|
|
|
|
allowOrigin: ['localhost'],
|
|
|
|
useSSL: false,
|
2017-10-12 23:09:04 +00:00
|
|
|
hsts: {
|
|
|
|
enable: true,
|
|
|
|
maxAgeSeconds: 31536000,
|
|
|
|
includeSubdomains: true,
|
|
|
|
preload: true
|
|
|
|
},
|
2017-10-18 15:10:23 +00:00
|
|
|
csp: {
|
|
|
|
enable: true,
|
|
|
|
directives: {
|
2017-10-18 15:45:57 +00:00
|
|
|
},
|
2017-10-20 10:31:16 +00:00
|
|
|
addDefaults: true,
|
2018-03-30 14:33:32 +00:00
|
|
|
addDisqus: true,
|
|
|
|
addGoogleAnalytics: true,
|
2018-03-10 13:34:14 +00:00
|
|
|
upgradeInsecureRequests: 'auto',
|
|
|
|
reportURI: undefined
|
2017-10-18 15:10:23 +00:00
|
|
|
},
|
2018-03-07 14:17:35 +00:00
|
|
|
protocolUseSSL: false,
|
|
|
|
useCDN: true,
|
|
|
|
allowAnonymous: true,
|
|
|
|
allowAnonymousEdits: false,
|
|
|
|
allowFreeURL: false,
|
|
|
|
defaultPermission: 'editable',
|
|
|
|
dbURL: '',
|
2017-04-12 17:57:55 +00:00
|
|
|
db: {},
|
|
|
|
// ssl path
|
2018-03-07 14:17:35 +00:00
|
|
|
sslKeyPath: '',
|
|
|
|
sslCertPath: '',
|
|
|
|
sslCAPath: '',
|
|
|
|
dhParamPath: '',
|
2017-04-12 17:57:55 +00:00
|
|
|
// other path
|
2018-03-07 14:17:35 +00:00
|
|
|
tmpPath: './tmp',
|
|
|
|
defaultNotePath: './public/default.md',
|
|
|
|
docsPath: './public/docs',
|
|
|
|
indexPath: './public/views/index.ejs',
|
|
|
|
hackmdPath: './public/views/hackmd.ejs',
|
|
|
|
errorPath: './public/views/error.ejs',
|
|
|
|
prettyPath: './public/views/pretty.ejs',
|
|
|
|
slidePath: './public/views/slide.ejs',
|
2017-04-12 17:57:55 +00:00
|
|
|
// session
|
2018-03-07 14:17:35 +00:00
|
|
|
sessionName: 'connect.sid',
|
|
|
|
sessionSecret: 'secret',
|
2018-03-25 22:30:17 +00:00
|
|
|
sessionSecretLen: 128,
|
2018-03-07 14:17:35 +00:00
|
|
|
sessionLife: 14 * 24 * 60 * 60 * 1000, // 14 days
|
|
|
|
staticCacheTime: 1 * 24 * 60 * 60 * 1000, // 1 day
|
2017-04-12 17:57:55 +00:00
|
|
|
// socket.io
|
2018-03-07 14:17:35 +00:00
|
|
|
heartbeatInterval: 5000,
|
|
|
|
heartbeatTimeout: 10000,
|
2017-04-12 17:57:55 +00:00
|
|
|
// document
|
2018-03-07 14:17:35 +00:00
|
|
|
documentMaxLength: 100000,
|
2017-04-12 17:57:55 +00:00
|
|
|
// image upload setting, available options are imgur/s3/filesystem
|
2018-03-07 14:17:35 +00:00
|
|
|
imageUploadType: 'filesystem',
|
2017-04-12 17:57:55 +00:00
|
|
|
imgur: {
|
|
|
|
clientID: undefined
|
|
|
|
},
|
|
|
|
s3: {
|
|
|
|
accessKeyId: undefined,
|
|
|
|
secretAccessKey: undefined,
|
|
|
|
region: undefined
|
|
|
|
},
|
2017-08-30 16:58:34 +00:00
|
|
|
minio: {
|
|
|
|
accessKey: undefined,
|
|
|
|
secretKey: undefined,
|
|
|
|
endPoint: undefined,
|
|
|
|
secure: true,
|
|
|
|
port: 9000
|
|
|
|
},
|
2017-04-12 17:57:55 +00:00
|
|
|
s3bucket: undefined,
|
|
|
|
// authentication
|
|
|
|
facebook: {
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
|
|
|
twitter: {
|
|
|
|
consumerKey: undefined,
|
|
|
|
consumerSecret: undefined
|
|
|
|
},
|
|
|
|
github: {
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
|
|
|
gitlab: {
|
|
|
|
baseURL: undefined,
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined,
|
|
|
|
scope: undefined
|
|
|
|
},
|
2017-10-29 10:16:40 +00:00
|
|
|
mattermost: {
|
|
|
|
baseURL: undefined,
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
2017-04-12 17:57:55 +00:00
|
|
|
dropbox: {
|
|
|
|
clientID: undefined,
|
2018-01-18 16:25:08 +00:00
|
|
|
clientSecret: undefined,
|
|
|
|
appKey: undefined
|
2017-04-12 17:57:55 +00:00
|
|
|
},
|
|
|
|
google: {
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
|
|
|
ldap: {
|
|
|
|
providerName: undefined,
|
|
|
|
url: undefined,
|
|
|
|
bindDn: undefined,
|
|
|
|
bindCredentials: undefined,
|
|
|
|
searchBase: undefined,
|
|
|
|
searchFilter: undefined,
|
|
|
|
searchAttributes: undefined,
|
2017-12-09 10:17:06 +00:00
|
|
|
usernameField: undefined,
|
2018-03-01 22:51:47 +00:00
|
|
|
useridField: undefined,
|
2017-04-12 17:57:55 +00:00
|
|
|
tlsca: undefined
|
|
|
|
},
|
2017-11-28 03:46:58 +00:00
|
|
|
saml: {
|
|
|
|
idpSsoUrl: undefined,
|
|
|
|
idpCert: undefined,
|
|
|
|
issuer: undefined,
|
|
|
|
identifierFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
|
|
|
|
groupAttribute: undefined,
|
|
|
|
externalGroups: [],
|
|
|
|
requiredGroups: [],
|
|
|
|
attribute: {
|
|
|
|
id: undefined,
|
|
|
|
username: undefined,
|
|
|
|
email: undefined
|
|
|
|
}
|
|
|
|
},
|
2017-04-12 17:57:55 +00:00
|
|
|
email: true,
|
2018-03-07 14:17:35 +00:00
|
|
|
allowEmailRegister: true,
|
|
|
|
allowPDFExport: true
|
2017-04-12 17:57:55 +00:00
|
|
|
}
|