check if config.rate_limiting exists
This commit is contained in:
parent
a5779cac53
commit
26dc6be763
|
@ -13,6 +13,10 @@ module.exports = (app, redis, fetch, RedditAPI) => {
|
|||
let processSubredditsExplore = require('./inc/processSubredditsExplore.js')();
|
||||
|
||||
app.all('*', (req, res, next) => {
|
||||
if(!config.rate_limiting) {
|
||||
return next()
|
||||
}
|
||||
|
||||
if(config.rate_limiting.enabled) {
|
||||
/**
|
||||
* This route enforces request limits based on an IP address if
|
||||
|
|
Loading…
Reference in New Issue