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
161
161
- "validation": Return input validation errors for custom rules
162
162
- "sanitation": Apply input sanitation on create and update
163
163
- "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
165
165
- "customization": Provides handlers for request and response customization
166
166
167
167
The "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
729
729
This construct adds a filter requiring "customer_id" to be "12" to every operation (except for "create").
730
730
It also sets the column "customer_id" on "create" to "12" and removes the column from any other write operation.
731
731
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
+
732
742
### Customization handlers
733
743
734
744
You 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