1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-09 01:56:39 +02:00

fix(reddit): cache tweak for 403 forbidden (#3830)

This commit is contained in:
Dag
2023-12-13 21:56:14 +01:00
committed by GitHub
parent f01729c86f
commit d157816e07
4 changed files with 14 additions and 2 deletions

View File

@@ -85,6 +85,11 @@ class RedditBridge extends BridgeAbstract
if ($e->getCode() === 429) {
$this->cache->set($cacheKey, true, 60 * 16);
}
if ($e->getCode() === 403) {
// 403 Forbidden
// This can possibly mean that reddit has permanently blocked this server's ip address
$this->cache->set($cacheKey, true, 60 * 61);
}
throw $e;
}
}