2017-04-12 17:57:55 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
domain: '',
|
|
|
|
urlpath: '',
|
|
|
|
port: 3000,
|
|
|
|
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,
|
2017-10-18 15:45:57 +00:00
|
|
|
upgradeInsecureRequests: 'auto'
|
2017-10-18 15:10:23 +00:00
|
|
|
},
|
2017-04-12 17:57:55 +00:00
|
|
|
protocolusessl: false,
|
|
|
|
usecdn: true,
|
|
|
|
allowanonymous: true,
|
2018-01-20 14:05:05 +00:00
|
|
|
allowanonymousedits: false,
|
2017-04-12 17:57:55 +00:00
|
|
|
allowfreeurl: false,
|
|
|
|
defaultpermission: 'editable',
|
|
|
|
dburl: '',
|
|
|
|
db: {},
|
|
|
|
// ssl path
|
|
|
|
sslkeypath: '',
|
|
|
|
sslcertpath: '',
|
|
|
|
sslcapath: '',
|
|
|
|
dhparampath: '',
|
|
|
|
// other path
|
|
|
|
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',
|
|
|
|
// session
|
|
|
|
sessionname: 'connect.sid',
|
|
|
|
sessionsecret: 'secret',
|
|
|
|
sessionlife: 14 * 24 * 60 * 60 * 1000, // 14 days
|
|
|
|
staticcachetime: 1 * 24 * 60 * 60 * 1000, // 1 day
|
|
|
|
// socket.io
|
|
|
|
heartbeatinterval: 5000,
|
|
|
|
heartbeattimeout: 10000,
|
|
|
|
// document
|
|
|
|
documentmaxlength: 100000,
|
|
|
|
// image upload setting, available options are imgur/s3/filesystem
|
2018-01-26 13:00:48 +00:00
|
|
|
imageuploadtype: 'filesystem',
|
|
|
|
// legacy variable name for imageuploadtype
|
|
|
|
imageUploadType: undefined,
|
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,
|
2017-10-25 13:49:37 +00:00
|
|
|
allowemailregister: true,
|
|
|
|
allowpdfexport: true
|
2017-04-12 17:57:55 +00:00
|
|
|
}
|