update default configuration file with new attributes and comments

pull/1/head
ansuz 8 years ago
parent a70014dd11
commit 605377cf31

@ -10,7 +10,7 @@ module.exports = {
// the port on which your httpd will listen // the port on which your httpd will listen
/* Cryptpad can be configured to send customized HTTP Headers /* CryptPad can be configured to send customized HTTP Headers
* These settings may vary widely depending on your needs * These settings may vary widely depending on your needs
* Examples are provided below * Examples are provided below
*/ */
@ -31,7 +31,7 @@ module.exports = {
* connect-src is used to restrict what domains can connect to the websocket. * connect-src is used to restrict what domains can connect to the websocket.
* *
* it is recommended that you configure these fields to match the * it is recommended that you configure these fields to match the
* domain which will serve your cryptpad instance. * domain which will serve your CryptPad instance.
*/ */
"child-src 'self' *", "child-src 'self' *",
@ -82,24 +82,24 @@ module.exports = {
*/ */
//websocketPort: 3000, //websocketPort: 3000,
/* if you want to run a different version of cryptpad but using the same websocket /* if you want to run a different version of CryptPad but using the same websocket
* server, you should use the other server port as websocketPort and disable * server, you should use the other server port as websocketPort and disable
* the websockets on that server * the websockets on that server
*/ */
//useExternalWebsocket: false, //useExternalWebsocket: false,
/* If Cryptpad is proxied without using https, the server needs to know. /* If CryptPad is proxied without using https, the server needs to know.
* Specify 'useSecureWebsockets: true' so that it can send * Specify 'useSecureWebsockets: true' so that it can send
* Content Security Policy Headers that prevent http and https from mixing * Content Security Policy Headers that prevent http and https from mixing
*/ */
useSecureWebsockets: false, useSecureWebsockets: false,
/* Cryptpad can log activity to stdout /* CryptPad can log activity to stdout
* This may be useful for debugging * This may be useful for debugging
*/ */
logToStdout: false, logToStdout: false,
/* Cryptpad supports verbose logging /* CryptPad supports verbose logging
* (false by default) * (false by default)
*/ */
verbose: false, verbose: false,
@ -116,13 +116,16 @@ module.exports = {
'contact', 'contact',
], ],
/* Limits, Subscriptions and Contact /* Limits, Donations, Subscriptions and Contact
*
* By default, CryptPad limits every registered user to 50MB of storage. It also shows a
* donate button which allows for making a donation to support CryptPad development.
* *
* CryptPad limits every registered user to 50MB of storage.
* By default it also allows that limit to be increased by subscribing at accounts.cryptpad.fr
* You can either: * You can either:
* A: Hide the button for subscribing, so everyone is limited to 50MB * A: Leave it exactly as it is.
* B: Support cryptpad and share 50% of the revenue earned on your instance * B: Hide the donate button.
* C: Change the donate button to a subscribe button, people who subscribe will get more
* storage on your instance and you get 50% of the revenue earned.
* *
* CryptPad is developed by people who need to live and who deserve an equivilent life to * CryptPad is developed by people who need to live and who deserve an equivilent life to
* what they would get at a company which monitizes user data. However, we intend to have * what they would get at a company which monitizes user data. However, we intend to have
@ -132,27 +135,35 @@ module.exports = {
* If you are using CryptPad in a business context, please consider taking a support contract * If you are using CryptPad in a business context, please consider taking a support contract
* by contacting sales@cryptpad.fr * by contacting sales@cryptpad.fr
* *
* If you choose A, set this variable to true to hide the subscription button. * If you choose A then there's nothing to do.
*
* If you choose B, set this variable to true and it will remove the donate button.
*/ */
noSubscriptionButton: false, removeDonateButton: false,
/* /*
* If you choose B, set the domain of your cryptpad instance here and then contact * If you choose C, set allowSubscriptions to true, then set myDomain to the domain which people
* sales@cryptpad.fr and tell us your domain, we will tell you what is needed to get paid. * use to reach your CryptPad instance. Then contact sales@cryptpad.fr and tell us your domain.
* We will tell you what is needed to get paid.
*/ */
myDomain: 'i.did.not.read.my.config.cryptpad.myserver.tld', allowSubscriptions: false,
myDomain: 'i.did.not.read.my.config.myserver.tld',
/* /*
* If you are using CryptPad internally and you want to increase the per-user storage limit, * If you are using CryptPad internally and you want to increase the per-user storage limit,
* change the following value. * change the following value.
* Please note: Providing a public offer that is better than cryptpad.fr is an attack on *
* the project. Please leave this alone if you are providing a public service. * Please note: This limit is what makes people subscribe and what pays for CryptPad
* development. Running a public instance that provides a "better deal" than cryptpad.fr
* is effectively using the project against itself.
*/ */
defaultStorageLimit: 50 * 1024 * 1024, defaultStorageLimit: 50 * 1024 * 1024,
/* /*
* By default, CryptPad contacts our accounts server once a day to check for changes in the * By default, CryptPad also contacts our accounts server once a day to check for changes in
* people who have accounts. This check-in will also send your email and the version of * the people who have accounts. This check-in will also send the version of your CryptPad
* CryptPad you run so we can reach you if we are aware of a serious problem with your * instance and your email so we can reach you if we are aware of a serious problem. We will
* CryptPad instance. We will never sell it or use it for marketing. If you want to block this * never sell it or send you marketing mail. If you want to block this check-in and remain
* check-in and remain completely private, set this to false and noSubscriptionButton to true. * completely invisible, set this and allowSubscriptions both to false.
*/ */
adminEmail: 'i.did.not.read.my.config@cryptpad.fr', adminEmail: 'i.did.not.read.my.config@cryptpad.fr',
@ -176,7 +187,7 @@ module.exports = {
storage: './storage/file', storage: './storage/file',
/* /*
Cryptpad stores each document in an individual file on your hard drive. CryptPad stores each document in an individual file on your hard drive.
Specify a directory where files should be stored. Specify a directory where files should be stored.
It will be created automatically if it does not already exist. It will be created automatically if it does not already exist.
*/ */
@ -199,17 +210,17 @@ module.exports = {
*/ */
blobStagingPath: './blobstage', blobStagingPath: './blobstage',
/* Cryptpad's file storage adaptor closes unused files after a configurale /* CryptPad's file storage adaptor closes unused files after a configurale
* number of milliseconds (default 30000 (30 seconds)) * number of milliseconds (default 30000 (30 seconds))
*/ */
channelExpirationMs: 30000, channelExpirationMs: 30000,
/* Cryptpad's file storage adaptor is limited by the number of open files. /* CryptPad's file storage adaptor is limited by the number of open files.
* When the adaptor reaches openFileLimit, it will clean up older files * When the adaptor reaches openFileLimit, it will clean up older files
*/ */
openFileLimit: 2048, openFileLimit: 2048,
/* Cryptpad's socket server can be extended to respond to RPC calls /* CryptPad's socket server can be extended to respond to RPC calls
* you can configure it to respond to custom RPC calls if you like. * you can configure it to respond to custom RPC calls if you like.
* provide the path to your RPC module here, or `false` if you would * provide the path to your RPC module here, or `false` if you would
* like to disable the RPC interface completely * like to disable the RPC interface completely
@ -261,7 +272,7 @@ module.exports = {
*/ */
//logFeedback: true, //logFeedback: true,
/* it is recommended that you serve cryptpad over https /* it is recommended that you serve CryptPad over https
* the filepaths below are used to configure your certificates * the filepaths below are used to configure your certificates
*/ */
//privKeyAndCertFiles: [ //privKeyAndCertFiles: [

@ -373,7 +373,7 @@ var getHash = function (Env, publicKey, cb) {
// To each key is associated an object containing the 'limit' value and a 'note' explaining that limit // To each key is associated an object containing the 'limit' value and a 'note' explaining that limit
var limits = {}; var limits = {};
var updateLimits = function (config, publicKey, cb) { var updateLimits = function (config, publicKey, cb) {
if (config.adminEmail === false && config.noSubscriptionButton === true) { return; } if (config.adminEmail === false && config.allowSubscriptions === false) { return; }
if (typeof cb !== "function") { cb = function () {}; } if (typeof cb !== "function") { cb = function () {}; }
var defaultLimit = typeof(config.defaultStorageLimit) === 'number'? var defaultLimit = typeof(config.defaultStorageLimit) === 'number'?

@ -121,7 +121,9 @@ app.get('/api/config', function(req, res){
waitSeconds: 60, waitSeconds: 60,
urlArgs: 'ver=' + Package.version + (DEV_MODE? '-' + (+new Date()): ''), urlArgs: 'ver=' + Package.version + (DEV_MODE? '-' + (+new Date()): ''),
}, },
noSubscriptionButton: (config.noSubscriptionButton === true), removeDonateButton: (config.removeDonateButton === true),
allowSubscriptions: (config.allowSubscriptions === true),
websocketPath: config.useExternalWebsocket ? undefined : config.websocketPath, websocketPath: config.useExternalWebsocket ? undefined : config.websocketPath,
websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' + websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' +
websocketPort + '/cryptpad_websocket', websocketPort + '/cryptpad_websocket',

Loading…
Cancel
Save