Skip to main content
Version: 13.x (Current)

Service Options

If you want to customize the Fastify instance over the default settings that lc39 will set you can export a json object in your module:

module.exports.options = {
redact: {
paths: ['supersecret', 'notread[*].here'],
censor: '[YOUTRIED]',
trustProxy: '',
oasRefResolver: {
buildLocalReference(json, baseUri, fragment, i) {
// your naming convention
customLevels: {
audit: 35,
success: 70

The values supported in this object are the supported keys and value for the Fastify server instance that you can find at this link; with the exception of the logger parameter.
Instead you can customize the pino instance via the logLevel and logger.customLevels keys, and you can modify the redaction rules via the redact key. For this key the accepted values are listed here.
You have the following additional keys:

  • oasRefResolver that is passed to the fastify-swagger plugin as refResolver; its usage can be found here.