mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-01-08 20:32:33 +01:00
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')();
|
let processSubredditsExplore = require('./inc/processSubredditsExplore.js')();
|
||||||
|
|
||||||
app.all('*', (req, res, next) => {
|
app.all('*', (req, res, next) => {
|
||||||
|
if(!config.rate_limiting) {
|
||||||
|
return next()
|
||||||
|
}
|
||||||
|
|
||||||
if(config.rate_limiting.enabled) {
|
if(config.rate_limiting.enabled) {
|
||||||
/**
|
/**
|
||||||
* This route enforces request limits based on an IP address if
|
* This route enforces request limits based on an IP address if
|
||||||
|
Loading…
Reference in New Issue
Block a user