Skip to content

Opensearch dashboards.routeconfigoptions

Home > opensearch-dashboards > RouteConfigOptions

RouteConfigOptions interface

Additional route options.

Signature:

export interface RouteConfigOptions<Method extends RouteMethod> 

Properties

Property Type Description
authRequired? boolean | 'optional' (Optional) Defines authentication mode for a route: - true. A user has to have valid credentials to access a resource - false. A user can access a resource without any credentials. - 'optional'. A user can access a resource if has valid credentials or no credentials at all. Can be useful when we grant access to a resource but want to identify a user if possible.Defaults to true if an auth mechanism is registered.
body? Method extends 'get' | 'options' ? undefined : RouteConfigOptionsBody (Optional) Additional body options RouteConfigOptionsBody.
tags? readonly string[] (Optional) Additional metadata tag strings to attach to the route.
timeout? { payload?: Method extends 'get' | 'options' ? undefined : number; idleSocket?: number; } (Optional) Defines per-route timeouts.
xsrfRequired? Method extends 'get' ? never : boolean (Optional) Defines xsrf protection requirements for a route: - true. Requires an incoming POST/PUT/DELETE request to contain osd-xsrf header. - false. Disables xsrf protection.Set to true by default