Go to new doc!

+49 228 5552576-0


info@predic8.com

limit

Description

Limits the maximum length of a HTTP message body.

Can be used in

spring:beans, api, bean, if, interceptor, internalProxy, proxy, registration, request, response, serviceProxy, soapProxy, stompProxy, swaggerProxy, transport and wsStompReassembler

Syntax

				<limit
					maxBodyLength="integer"
				/>
			
Listing 1: limit Syntax

Sample

				<serviceProxy port="8080">
					<limit maxBodyLength="52428800" />
					<target host="www.predic8.com" />
				</serviceProxy>			
			

In this setup, all requests are forwarded to www.predic8.com. Requests larger than 50MB will be discarded.

Listing 2: limit Example

Attributes

Name Required Default Description Example
maxBodyLength false - The maximal length of a message body. 10485760

Explanation

Note that due to the streaming nature of Membrane, a request header may already have been passed on to the backend, when the condition "body.length > X" becomes true. In this case, further processing is aborted and the connection to the backend is simply closed.

To apply <limit/> only to either requests or responses, wrap it in a corresponding tag: <request><limit ... /></request> .