From 7a0c423357818b19eb431775452b1357bc7fd3eb Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 31 Jul 2025 09:17:42 +0200 Subject: Implement support for HTTP 429 Too Many Requests (#7760) * Implement support for HTTP 429 Too Many Requests Will obey the corresponding HTTP `Retry-After` header at domain level. * Implement 503 Service Unavailable * Sanitize Retry-After * Reduce default value when Retry-After is absent And make configuration parameter * Retry-After also for favicons --- config.default.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'config.default.php') diff --git a/config.default.php b/config.default.php index 0707b9f87..f42fdc215 100644 --- a/config.default.php +++ b/config.default.php @@ -103,10 +103,14 @@ return [ # Especially important for multi-user setups. # Might be overridden by HTTP response headers. 'cache_duration' => 800, - # Minimal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`, + # Minimal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`. 'cache_duration_min' => 60, - # Maximal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`, + # Maximal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`. 'cache_duration_max' => 86400, + # Default rate limit duration (in seconds), when HTTP response header `Retry-After` is absent. + 'retry_after_default' => 1500, + # Maximal rate limit duration (in seconds), overriding HTTP response header `Retry-After`. + 'retry_after_max' => 172800, # SimplePie HTTP request timeout in seconds. 'timeout' => 20, -- cgit v1.2.3