2017-04-12 13:57:55 -04:00
|
|
|
'use strict'
|
|
|
|
|
2018-09-20 19:23:39 -04:00
|
|
|
const os = require('os')
|
|
|
|
|
2017-04-12 13:57:55 -04:00
|
|
|
module.exports = {
|
|
|
|
domain: '',
|
2018-03-07 09:17:35 -05:00
|
|
|
urlPath: '',
|
2018-07-22 20:27:51 -04:00
|
|
|
host: '0.0.0.0',
|
2017-04-12 13:57:55 -04:00
|
|
|
port: 3000,
|
2018-11-13 17:29:33 -05:00
|
|
|
loglevel: 'info',
|
2018-03-07 09:17:35 -05:00
|
|
|
urlAddPort: false,
|
|
|
|
allowOrigin: ['localhost'],
|
|
|
|
useSSL: false,
|
2017-10-12 19:09:04 -04:00
|
|
|
hsts: {
|
|
|
|
enable: true,
|
2018-11-19 16:01:43 -05:00
|
|
|
maxAgeSeconds: 60 * 60 * 24 * 365,
|
2017-10-12 19:09:04 -04:00
|
|
|
includeSubdomains: true,
|
|
|
|
preload: true
|
|
|
|
},
|
2017-10-18 11:10:23 -04:00
|
|
|
csp: {
|
|
|
|
enable: true,
|
|
|
|
directives: {
|
2017-10-18 11:45:57 -04:00
|
|
|
},
|
2017-10-20 06:31:16 -04:00
|
|
|
addDefaults: true,
|
2021-06-07 14:06:44 -04:00
|
|
|
addDisqus: false,
|
|
|
|
addGoogleAnalytics: false,
|
2018-03-10 08:34:14 -05:00
|
|
|
upgradeInsecureRequests: 'auto',
|
2021-07-18 03:59:14 -04:00
|
|
|
reportURI: undefined,
|
2021-08-06 06:58:22 -04:00
|
|
|
allowFraming: true,
|
|
|
|
allowPDFEmbed: true
|
2017-10-18 11:10:23 -04:00
|
|
|
},
|
2020-08-27 03:05:17 -04:00
|
|
|
cookiePolicy: 'lax',
|
2018-03-07 09:17:35 -05:00
|
|
|
protocolUseSSL: false,
|
|
|
|
allowAnonymous: true,
|
|
|
|
allowAnonymousEdits: false,
|
|
|
|
allowFreeURL: false,
|
2021-01-22 10:47:47 -05:00
|
|
|
requireFreeURLAuthentication: false,
|
2019-09-18 16:54:08 -04:00
|
|
|
forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api', 'build', 'css', 'docs', 'fonts', 'js', 'uploads', 'vendor', 'views'],
|
2018-03-07 09:17:35 -05:00
|
|
|
defaultPermission: 'editable',
|
|
|
|
dbURL: '',
|
2017-04-12 13:57:55 -04:00
|
|
|
db: {},
|
|
|
|
// ssl path
|
2018-03-07 09:17:35 -05:00
|
|
|
sslKeyPath: '',
|
|
|
|
sslCertPath: '',
|
|
|
|
sslCAPath: '',
|
|
|
|
dhParamPath: '',
|
2017-04-12 13:57:55 -04:00
|
|
|
// other path
|
2018-09-10 16:35:38 -04:00
|
|
|
viewPath: './public/views',
|
2018-09-20 19:23:39 -04:00
|
|
|
tmpPath: os.tmpdir(),
|
2018-03-07 09:17:35 -05:00
|
|
|
defaultNotePath: './public/default.md',
|
|
|
|
docsPath: './public/docs',
|
2018-06-23 15:47:22 -04:00
|
|
|
uploadsPath: './public/uploads',
|
2017-04-12 13:57:55 -04:00
|
|
|
// session
|
2018-03-07 09:17:35 -05:00
|
|
|
sessionName: 'connect.sid',
|
|
|
|
sessionSecret: 'secret',
|
2018-03-25 18:30:17 -04:00
|
|
|
sessionSecretLen: 128,
|
2018-03-07 09:17:35 -05:00
|
|
|
sessionLife: 14 * 24 * 60 * 60 * 1000, // 14 days
|
|
|
|
staticCacheTime: 1 * 24 * 60 * 60 * 1000, // 1 day
|
2017-04-12 13:57:55 -04:00
|
|
|
// socket.io
|
2018-03-07 09:17:35 -05:00
|
|
|
heartbeatInterval: 5000,
|
|
|
|
heartbeatTimeout: 10000,
|
2018-11-26 18:26:25 -05:00
|
|
|
// too busy timeout
|
|
|
|
tooBusyLag: 70,
|
2017-04-12 13:57:55 -04:00
|
|
|
// document
|
2018-03-07 09:17:35 -05:00
|
|
|
documentMaxLength: 100000,
|
2019-02-01 06:33:27 -05:00
|
|
|
// image upload setting, available options are imgur/s3/filesystem/azure/lutim
|
2018-03-07 09:17:35 -05:00
|
|
|
imageUploadType: 'filesystem',
|
2019-02-01 06:33:27 -05:00
|
|
|
lutim: {
|
|
|
|
url: 'https://framapic.org/'
|
|
|
|
},
|
2017-04-12 13:57:55 -04:00
|
|
|
imgur: {
|
|
|
|
clientID: undefined
|
|
|
|
},
|
|
|
|
s3: {
|
|
|
|
accessKeyId: undefined,
|
|
|
|
secretAccessKey: undefined,
|
|
|
|
region: undefined
|
|
|
|
},
|
2022-05-25 15:49:32 -04:00
|
|
|
s3bucket: undefined,
|
|
|
|
s3folder: 'uploads',
|
|
|
|
s3publicFiles: false,
|
2017-08-30 12:58:34 -04:00
|
|
|
minio: {
|
|
|
|
accessKey: undefined,
|
|
|
|
secretKey: undefined,
|
|
|
|
endPoint: undefined,
|
|
|
|
secure: true,
|
|
|
|
port: 9000
|
|
|
|
},
|
2018-05-31 07:15:41 -04:00
|
|
|
azure: {
|
|
|
|
connectionString: undefined,
|
|
|
|
container: undefined
|
|
|
|
},
|
2017-04-12 13:57:55 -04:00
|
|
|
// authentication
|
2017-06-27 13:08:05 -04:00
|
|
|
oauth2: {
|
2018-10-04 14:43:39 -04:00
|
|
|
providerName: undefined,
|
2017-06-27 13:08:05 -04:00
|
|
|
authorizationURL: undefined,
|
|
|
|
tokenURL: undefined,
|
|
|
|
clientID: undefined,
|
2020-06-20 10:33:57 -04:00
|
|
|
clientSecret: undefined,
|
|
|
|
scope: undefined
|
2017-06-27 13:08:05 -04:00
|
|
|
},
|
2017-04-12 13:57:55 -04:00
|
|
|
facebook: {
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
|
|
|
twitter: {
|
|
|
|
consumerKey: undefined,
|
|
|
|
consumerSecret: undefined
|
|
|
|
},
|
|
|
|
github: {
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
|
|
|
gitlab: {
|
|
|
|
baseURL: undefined,
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined,
|
2018-09-25 08:15:36 -04:00
|
|
|
scope: undefined,
|
|
|
|
version: 'v4'
|
2017-04-12 13:57:55 -04:00
|
|
|
},
|
2017-10-29 06:16:40 -04:00
|
|
|
mattermost: {
|
|
|
|
baseURL: undefined,
|
|
|
|
clientID: undefined,
|
|
|
|
clientSecret: undefined
|
|
|
|
},
|
2017-04-12 13:57:55 -04:00
|
|
|
dropbox: {
|
|
|
|
clientID: undefined,
|
2018-01-18 11:25:08 -05:00
|
|
|
clientSecret: undefined,
|
|
|
|
appKey: undefined
|
2017-04-12 13:57:55 -04:00
|
|
|
},
|
|
|
|
google: {
|
|
|
|
clientID: undefined,
|
2020-02-06 19:51:58 -05:00
|
|
|
clientSecret: undefined,
|
|
|
|
hostedDomain: undefined
|
2017-04-12 13:57:55 -04:00
|
|
|
},
|
|
|
|
ldap: {
|
|
|
|
providerName: undefined,
|
|
|
|
url: undefined,
|
|
|
|
bindDn: undefined,
|
|
|
|
bindCredentials: undefined,
|
|
|
|
searchBase: undefined,
|
|
|
|
searchFilter: undefined,
|
|
|
|
searchAttributes: undefined,
|
2017-12-09 05:17:06 -05:00
|
|
|
usernameField: undefined,
|
2018-03-01 17:51:47 -05:00
|
|
|
useridField: undefined,
|
2017-04-12 13:57:55 -04:00
|
|
|
tlsca: undefined
|
|
|
|
},
|
2017-11-27 22:46:58 -05:00
|
|
|
saml: {
|
2022-03-11 08:32:40 -05:00
|
|
|
providerName: undefined,
|
2017-11-27 22:46:58 -05:00
|
|
|
idpSsoUrl: undefined,
|
|
|
|
idpCert: undefined,
|
2020-04-29 12:27:00 -04:00
|
|
|
clientCert: undefined,
|
2017-11-27 22:46:58 -05:00
|
|
|
issuer: undefined,
|
|
|
|
identifierFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
|
2018-12-12 04:40:24 -05:00
|
|
|
disableRequestedAuthnContext: false,
|
2017-11-27 22:46:58 -05:00
|
|
|
groupAttribute: undefined,
|
|
|
|
externalGroups: [],
|
|
|
|
requiredGroups: [],
|
|
|
|
attribute: {
|
|
|
|
id: undefined,
|
|
|
|
username: undefined,
|
|
|
|
email: undefined
|
|
|
|
}
|
|
|
|
},
|
2017-04-12 13:57:55 -04:00
|
|
|
email: true,
|
2018-03-07 09:17:35 -05:00
|
|
|
allowEmailRegister: true,
|
2018-06-23 17:40:46 -04:00
|
|
|
allowGravatar: true,
|
2019-10-21 16:10:06 -04:00
|
|
|
openID: false,
|
2019-10-29 04:56:47 -04:00
|
|
|
// linkifyHeaderStyle - How is a header text converted into a link id.
|
|
|
|
// Header Example: "3.1. Good Morning my Friend! - Do you have 5$?"
|
2020-07-02 11:22:52 -04:00
|
|
|
// * 'keep-case' is the legacy HedgeDoc value.
|
2019-10-29 04:56:47 -04:00
|
|
|
// Generated id: "31-Good-Morning-my-Friend---Do-you-have-5"
|
|
|
|
// * 'lower-case' is the same like legacy (see above), but converted to lower-case.
|
|
|
|
// Generated id: "#31-good-morning-my-friend---do-you-have-5"
|
|
|
|
// * 'gfm' _GitHub-Flavored Markdown_ style as described here:
|
|
|
|
// https://gist.github.com/asabaylus/3071099#gistcomment-1593627
|
|
|
|
// It works like 'lower-case', but making sure the ID is unique.
|
|
|
|
// This is What GitHub, GitLab and (hopefully) most other tools use.
|
|
|
|
// Generated id: "31-good-morning-my-friend---do-you-have-5"
|
|
|
|
// 2nd appearance: "31-good-morning-my-friend---do-you-have-5-1"
|
|
|
|
// 3rd appearance: "31-good-morning-my-friend---do-you-have-5-2"
|
2023-06-04 14:46:59 -04:00
|
|
|
linkifyHeaderStyle: 'keep-case',
|
|
|
|
enableStatsApi: true
|
2017-04-12 13:57:55 -04:00
|
|
|
}
|