Skip to main content

readHelmetOptions()

Home > @backstage/backend-app-api > readHelmetOptions

Attempts to read Helmet options from the backend configuration object.

Signature:

function readHelmetOptions(config?: Config): HelmetOptions;

Parameters

ParameterTypeDescription
configConfig(Optional) The backend configuration object.

Returns:

HelmetOptions

A Helmet options object, or undefined if no Helmet configuration is present.

Example

const helmetOptions = readHelmetOptions(config.getConfig('backend'));