fix(rate limit): Fine tuning rate limits for internal calls

This commit is contained in:
Chris Troutner
2021-02-24 14:40:16 -08:00
parent 80dc296dee
commit 8a91f3ae3a
+2 -1
View File
@@ -136,7 +136,8 @@ class RateLimits {
// For internal calls that make a lot of internal calls, like
// hydrateUtxoDetails(), the origin of the caller will be passed in
// via the POST body.
if (req.body && req.body.ip) {
const keyIsLocal = key.includes('172.17.0.1') || key.includes('127.0.0.1')
if (req.body && req.body.ip && keyIsLocal) {
key = req.body.ip
}
console.log(`key: ${key}`)