X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=config%2Fdefault.js;h=58ba307926fea8dd9cb0bbbb827b8ca152e90845;hb=e23bda592175ae5ed772f366069ccfd2f60e1f70;hp=64f45eca22399ba7b44ebae0f586a7306e078650;hpb=f92c90e92ded661ddd957580e7fbde8aaa24224d;p=websub-hub
diff --git a/config/default.js b/config/default.js
index 64f45ec..58ba307 100644
--- a/config/default.js
+++ b/config/default.js
@@ -2,13 +2,21 @@
// Provide default values for all configuration.
-const packageName = require('../package.json').name;
+const { name: packageName, version: packageVersion } = require('../package.json');
const common = require('../src/common');
+const Enum = require('../src/enum');
+const roman = require('@squeep/roman');
+
+const currentYear = (new Date()).getFullYear();
+const romanYearHTML = roman.toRoman(currentYear, true);
const defaultOptions = {
// Uniquely identify this instance, used to tag work-in-progress.
nodeId: common.requestId(), // Default to ephemeral ID: easiest for clustered deployments.
+ // This should be set to a reasonably long passphrase or random buffer, to keep client session data secure.
+ encryptionSecret: undefined, // REQUIRED
+
// Dingus API Server Framework options. Be sure to set the one REQUIRED option here.
dingus: {
// This needs to be the full externally accessible root URL, including any proxyPrefix component, which clients will connect to, and which topics will list as their hub link.
@@ -44,31 +52,38 @@ const defaultOptions = {
manager: {
pageTitle: packageName, // title on html pages
+ logoUrl: 'static/logo.svg', // image to go with title
footerEntries: [ // common footers on all html pages
'Development Repository / GitHub mirror',
- '©',
+ `©`,
],
+ publishHistoryDays: 60, // Number of days of update history to show on topic details page
strictSecrets: false, // If true, reject requests with secrets but not over https
publicHub: true, // Accept publish requests as new topics.
processImmediately: true, // If true, immediately attempt to process requests when accepted.
},
communication: {
+ requestTimeoutMs: 120000,
strictTopicHubLink: true, // If true, deletes topics which do not list us (dingus.selfBaseUrl) as a hub relation.
retryBackoffSeconds: [60, 120, 360, 1440, 7200, 43200, 86400], // failed requests retry according to number of attempts
claimTimeoutSeconds: 600, // how long until an in-progress task is deemed abandoned
},
- // Outgoing request UA header. Comments are defaults in code.
+ // Outgoing request UA header.
+ // These values are the same as the defaults in the code, but we are setting
+ // them here so they also apply to UA of other modules, e.g. @squeep/indieauth-helper
userAgent: {
- // product: packageName,
- // version: packageVersion,
- // implementation: Enum.Specification,
+ product: packageName,
+ version: packageVersion,
+ implementation: Enum.Specification,
},
authenticator: {
basicRealm: packageName, // Realm prompt for login on administration pages
secureAuthOnly: true, // Require secure transport for authentication.
+ authnEnabled: ['indieAuth', 'argon2', 'pam'],
+ forbiddenPAMIdentifiers: ['root'],
},
worker: {
@@ -79,4 +94,4 @@ const defaultOptions = {
};
-module.exports = defaultOptions;
\ No newline at end of file
+module.exports = defaultOptions;