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
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
logRequestID
• Optional logRequestID: boolean
Specifies whether request IDs should be logged autmatically. Default is true.
Defined in
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
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
trustForwardedFor
• Optional trustForwardedFor: boolean
If true, incoming x-forwarded-for will be trusted and parsed. Default is false.
Defined in
trustForwardedHost
• Optional trustForwardedHost: boolean
If true, incoming x-forwarded-host will be trusted and parsed. Default is false.
Defined in
trustForwardedProto
• Optional trustForwardedProto: boolean
If true, incoming x-forwarded-proto will be trusted and parsed. Default is false.
Defined in
trustMethodOverride
• Optional trustMethodOverride: boolean
If true, incoming x-http-method-override will be trusted and parsed. Default is false.
Defined in
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.