Skip to main content

Interface: WebServiceConfig

@divine/web-service.WebServiceConfig

The WebService configuration properties.

Properties

console

Optional console: Console

Where logs should be sent. Default is the global console object.

Defined in

web-service/src/service.ts:14


errorMessageProperty

Optional errorMessageProperty: string

The name of the property holding the error message when a WebError is converted to a structued WebResponse. Default is message.

When an error is caught, it can be converted a JSON object with a single property holding the error message, and the errorMessageProperty configuration specifies the name of that property.

{ "message": "No resource matches the path /foobar" }

Defined in

web-service/src/service.ts:27


logRequestID

Optional logRequestID: boolean

Specifies whether request IDs should be logged autmatically. Default is true.

Defined in

web-service/src/service.ts:30


maxContentLength

Optional maxContentLength: number

Specifies the default maximum payload size body should accept, unless an explicit limit is proveded in the call. Default is 1,000,000 bytes.

Defined in

web-service/src/service.ts:36


returnRequestID

Optional returnRequestID: null | string

If not null, the request ID will be automatically be returned in this HTTP response header. Default is null.

Defined in

web-service/src/service.ts:39


trustForwardedFor

Optional trustForwardedFor: boolean

If true, incoming x-forwarded-for will be trusted and parsed. Default is false.

Defined in

web-service/src/service.ts:42


trustForwardedHost

Optional trustForwardedHost: boolean

If true, incoming x-forwarded-host will be trusted and parsed. Default is false.

Defined in

web-service/src/service.ts:45


trustForwardedProto

Optional trustForwardedProto: boolean

If true, incoming x-forwarded-proto will be trusted and parsed. Default is false.

Defined in

web-service/src/service.ts:48


trustMethodOverride

Optional trustMethodOverride: boolean

If true, incoming x-http-method-override will be trusted and parsed. Default is false.

Defined in

web-service/src/service.ts:51


trustRequestID

Optional trustRequestID: null | string

If not null, the HTTP request header containing the request ID. Default is null, which means a new request ID will be generated for each incoming request.

Defined in

web-service/src/service.ts:57