Skip to Content
ConfigurationConfiguration Reference

Configuration Reference

Public constructor options and lifecycle entry points.

Constructor options

OptionTypeRequiredDescription
auth{ username: string; password: string }YesCredentials used by the embedded dashboard. Construction fails if either value is missing.
redaction{ additionalHeaders?: string[] }NoExtends the default sensitive HTTP header names. Matching is trimmed, case-insensitive, and de-duplicated.
encryption{ key: string; fields?: string[] }NoEncrypt matching sensitive fields in SQLite using a base64 32-byte key.
getCurrentUser(req: IncomingMessage) => Record<string, unknown> | undefinedNoReturns the user already attached by the host application.

Lifecycle and integration methods

MethodDescription
start()Registers the OpenTelemetry loader hook once per process, starts the OpenTelemetry SDK, and enables fetch capture.
middleware(req, res, next)Serves /_devtools and wraps application responses for capture before calling next().
handle(req, res)Handles dashboard requests directly. Most applications should use middleware().
shutdown()Stops fetch capture, shuts down OpenTelemetry, and closes SQLite storage.

The NestJS package export is ServerDevToolsNestInterceptor from server-devtools/nestjs.

Last updated on