You can choose to configure CodiMD with either a config file or with
environment variables. The config file is processed
in lib/config/index.js - so this is the first
place to look if anything is missing not obvious from this document. The
default values are defined in lib/config/default.js,
in case you wonder if you even need to override it.
Environment variables take precedence over configurations from the config files.
To get started, it is a good idea to take the config.json.example and copy it
to config.json before filling in your own details.
Configures Content Security Policy. Directives are passed to Helmet - see their documentation for more information on the format. Some defaults are added to the configured values so that the application doesn't break. To disable this behaviour, set addDefaults to false. Further, if usecdn is on, some CDN locations are allowed too. By default (auto), insecure (HTTP) requests are upgraded to HTTPS via CSP if useSSL is on. To change this behaviour, set upgradeInsecureRequests to either true or false.
Privacy and External Requests
variables
example values
description
allowGravatar
true or false
set to false to disable gravatar as profile picture source on your instance
useCDN
true or false
set to use CDN resources or not (default is true)
Users and Privileges
variables
example values
description
allowAnonymous
true or false
set to allow anonymous usage (default is true)
allowAnonymousEdits
true or false
if allowAnonymous is true: allow users to select freely permission, allowing guests to edit existing notes (default is false)
allowFreeURL
true or false
set to allow new note creation by accessing a nonexistent note URL
defaultPermission
freely, editable, limited, locked, protected or private
set notes default permission (only applied on signed users)
sessionName
connect.sid
cookie session name
sessionLife
14 * 24 * 60 * 60 * 1000
cookie session life
sessionSecret
secret
cookie session secret
Login methods
Most of these have never been documented for the config.json, feel free to expand these
Email (local account)
variables
example values
description
email
true or false
set to allow email signin
allowEmailRegister
true or false
set to allow email register (only applied when email is set, default is true. Note bin/manage_users might help you if registration is false.)