/
config.js.default
113 lines (93 loc) · 2.69 KB
/
config.js.default
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
module.exports = {
/**
* Postgres connection settings. Either a string or an object, see the documentation of the
* constructor on https://github.com/brianc/node-postgres/wiki/Client.
*/
"db" : "postgres://gnewpg@localhost/gnewpg",
/**
* The port to run the HTTP server on.
*/
"port" : 8888,
/**
* The address to listen on. Leave empty to listen on all interfaces.
*/
"address" : "",
/**
* Lifetime for normal login sessions in seconds.
*/
"sessionTimeout" : 3600,
/**
* Lifetime for sessions with “stay logged in” in seconds.
*/
"persistentSessionTimeout" : 31536000,
/**
* Lifetime for tokens used in verification e-mails.
*/
"tokenTimeout" : 86400,
/**
* Min and max length for user names.
*/
"usernameMinLength" : 4,
"usernameMaxLength" : 20,
/**
* Min length for passwords.
*/
"passwordMinLength" : 8,
/**
* Private key to sign e-mails with.
*/
"notificationPrivateKey" : "./privateNotificationKey.asc",
/**
* Sender address for e-mails.
*/
"notificationFrom" : "notifications@gnewpg.org",
/**
* Directory for temporary files.
*/
"tmpDir" : require("os").tmpDir() + "/gnewpg",
/**
* Mail transport configuration. See https://github.com/andris9/Nodemailer#setting-up-a-transport-method
* for options.
*/
"mailTransport" : "SENDMAIL",
"mailTransportOptions" : { },
/**
* The maximum upload size in bytes. Be aware that people might want to upload their whole
* keyrings at once.
*/
"maxUploadSize" : 20000000,
/**
* The base URL of the application without a trailing slash. This is useful if gnewpg
* runs behind a proxy. Leave empty if not run behind a proxy.
*/
"baseurl" : "",
/**
* Set to true if run behind a reverse proxy so that hostname detection works properly.
*/
"trustProxy" : false,
/**
* The hostname that the HKP server will be reachable on. Leave empty to not start a HKP server
* on port 11371.
*/
"hkpHostname" : "keyserver.gnewpg.org",
/**
* The hostname for the personalised HKP servers. %s will be replaced by a secret string that is
* unique for each user account, so each user has a personal HKP server reachable under a secret
* URL.
*/
"personalHkpHostname" : "%s.keyserver.gnewpg.org",
/**
* Signatues (including trust signatures) by these keys will be trusted.
*/
"trustedKeys" : [ "1DFA47EF9D395D02" ],
/**
* Enables the /debug page.
*/
"debug" : false
};
require("node-pgp").config.tmpDir = module.exports.tmpDir;
require("node-pgp-postgres/lib/database").DEBUG = module.exports.debug;
var hkpConfig = require("node-pgp-hkp-server/config");
hkpConfig.maxUploadSize = module.exports.maxUploadSize;
hkpConfig.address = module.exports.address;
hkpConfig.trustProxy = module.exports.trustProxy;