mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 01:55:21 +02:00
fix(reddit): cache tweak for 403 forbidden (#3830)
This commit is contained in:
parent
f01729c86f
commit
d157816e07
4 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue