Skip to main content

useParameters

@webda/core


Function: useParameters()

useParameters(): object

Defined in: packages/core/src/application/hooks.ts:62

Get the current application parameters from the active configuration

Returns​

the result

apiUrl?​

optional apiUrl?: string

Define the api url

configurationEncryption?​

optional configurationEncryption?: ConfigurationEncryption

Configuration secrets encryption: default encrypter and encrypters options

It cannot hold encrypted values.

dryRun?​

optional dryRun?: object

Dry run configuration for operations

dryRun.allowRequest?​

optional allowRequest?: boolean

Accept the per-request X-Webda-Dry-Run header

dryRun.enabled?​

optional enabled?: boolean

Run every operation in dry mode

dryRun.enforce?​

optional enforce?: string[]

Operation id patterns that always run dry (glob, e.g. "Billing.*", "User.Delete")

dryRun.exclude?​

optional exclude?: string[]

Operation id patterns never put in dry mode by enabled/request flags

metrics?​

optional metrics?: false | { config?: {[key: string]: any; }; labels?: {[key: string]: string; }; prefix?: string; }

Define metrics

static?​

optional static?: StaticWebsite

Serve statically a website

website?​

optional website?: string | string[]

Origins allowed to call the API from a browser (CORS), matched on the request Origin header

Exact origins, https://*.example.com for the subdomains, or "*" for any origin

CorsOriginFilter