Skip to content

Commit 7c0675e

Browse files
committed
Limit listings to 150 items.
Works around bots generating excessive traffic by stepping through all listing pages. syslabcom/scrum#2211
1 parent ec9d5b4 commit 7c0675e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/recensio/plone/browser/listing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def rss_url(self):
4545
@property
4646
def items(self):
4747
catalog = api.portal.get_tool("portal_catalog")
48-
results = catalog(self.query)
48+
results = catalog(self.query)[:150]
4949
IAnnotations(self.request)["recensio.query_results"] = results
5050
results = IContentListing(results)
5151
return results

0 commit comments

Comments
 (0)