File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ You can enable the following middleware using the "middlewares" config parameter
161161- "validation": Return input validation errors for custom rules
162162- "sanitation": Apply input sanitation on create and update
163163- "multiTenancy": Restricts tenants access in a multi-tenant scenario
164- - "pageLimits": Restricts list operations to prevent heavy load and scraping
164+ - "pageLimits": Restricts list operations to prevent high load and scraping
165165- "customization": Provides handlers for request and response customization
166166
167167The "middlewares" config parameter is a comma separated list of enabled middlewares.
@@ -729,6 +729,16 @@ If your tenants are identified by the "customer_id" column you can use the follo
729729This construct adds a filter requiring "customer_id" to be "12" to every operation (except for "create").
730730It also sets the column "customer_id" on "create" to "12" and removes the column from any other write operation.
731731
732+ ### Prevent high load and scraping
733+
734+ You may use the "pageLimits" middleware to limit the page number and the number records returned from a list operation.
735+ If you want no more than 10 pages with a maximum of 25 records each, you can specify:
736+
737+ 'pageLimits.pages' => 10,
738+ 'pageLimits.records' => 25,
739+
740+ NB: The maximum number of records is also applied when there is no page number specified in the request.
741+
732742### Customization handlers
733743
734744You may use the "customization" middleware to modify request and response and implement any other functionality.
You can’t perform that action at this time.
0 commit comments