update copyright
[websub-hub] / config / default.js
index 5c7091fce7ce87befc70a54bc1146856d141f4dd..b23d0f8833919fdd29af7480abd552f9f3b74b30 100644 (file)
@@ -2,13 +2,17 @@
 
 // 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 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.
@@ -22,6 +26,12 @@ const defaultOptions = {
   db: {
     connectionString: '', // e.g. sqlite://path/to/dbfile.sqlite
     queryLogLevel: undefined, // Set to log queries
+    cacheEnabled: true, // Cache some db responses. (Postgres only)
+    listener: { // Settings for the cache-invalidator connection. (Postgres only)
+      // pingDelayMs: 5000, // Connection keep-alive/health-check.
+      // reconnectDelayMs: 6000, // Wait time before attempting reconnection.
+      // reconnectTimes: 10, // Retries limit.
+    },
   },
 
   // Logging options
@@ -38,6 +48,11 @@ 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
+      '<a href="https://git.squeep.com/?p=websub-hub;a=tree">Development Repository</a> / <a href="https://github.com/thylacine/websub-hub/">GitHub mirror</a>',
+      '<span class="copyright">&copy;<time datetime="2022">&#8559;&#8559;&#8553;&#8553;&#8544;&#8544;</time></span>',
+    ],
     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.
@@ -49,16 +64,20 @@ const defaultOptions = {
     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: {
@@ -69,4 +88,4 @@ const defaultOptions = {
 
 };
 
-module.exports = defaultOptions;
\ No newline at end of file
+module.exports = defaultOptions;