summaryrefslogtreecommitdiff
path: root/lib/config/default.js
blob: 4080347621a6cf766311618aa18a2817cc36d74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
'use strict'

module.exports = {
  domain: '',
  urlpath: '',
  port: 3000,
  urladdport: false,
  alloworigin: ['localhost'],
  usessl: false,
  hsts: {
    enable: true,
    maxAgeSeconds: 31536000,
    includeSubdomains: true,
    preload: true
  },
  protocolusessl: false,
  usecdn: true,
  allowanonymous: true,
  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
  imageUploadType: 'filesystem',
  imgur: {
    clientID: undefined
  },
  s3: {
    accessKeyId: undefined,
    secretAccessKey: undefined,
    region: undefined
  },
  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
  },
  mattermost: {
    baseURL: undefined,
    clientID: undefined,
    clientSecret: undefined
  },
  dropbox: {
    clientID: undefined,
    clientSecret: undefined,
    appKey: undefined
  },
  google: {
    clientID: undefined,
    clientSecret: undefined
  },
  ldap: {
    providerName: undefined,
    url: undefined,
    bindDn: undefined,
    bindCredentials: undefined,
    tokenSecret: undefined,
    searchBase: undefined,
    searchFilter: undefined,
    searchAttributes: undefined,
    usernameField: undefined,
    tlsca: undefined
  },
  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
    }
  },
  email: true,
  allowemailregister: true,
  allowpdfexport: true
}