diff --git a/app.js b/app.js index a4d8ae48..010b3775 100644 --- a/app.js +++ b/app.js @@ -28,6 +28,7 @@ import * as databaseInitializer from './helpers/initializer.database.js'; import { apiGetHandler } from './handlers/permissions.js'; import { getSafeRedirectURL } from './helpers/functions.authentication.js'; import debug from 'debug'; +import { useTestDatabases } from './data/databasePaths.js'; const debugApp = debug('lot-occupancy-system:app'); databaseInitializer.initializeDatabase(); const _dirname = '.'; @@ -55,7 +56,7 @@ app.use(csurf({ })); app.use(rateLimit({ windowMs: 10000, - max: 200 + max: useTestDatabases ? 1000000 : 200 })); const urlPrefix = configFunctions.getProperty('reverseProxy.urlPrefix'); if (urlPrefix !== '') { diff --git a/app.ts b/app.ts index 6c4288af..9b8a4002 100644 --- a/app.ts +++ b/app.ts @@ -36,6 +36,7 @@ import { apiGetHandler } from './handlers/permissions.js' import { getSafeRedirectURL } from './helpers/functions.authentication.js' import debug from 'debug' +import { useTestDatabases } from './data/databasePaths.js' const debugApp = debug('lot-occupancy-system:app') /* @@ -93,7 +94,7 @@ app.use( app.use( rateLimit({ windowMs: 10_000, - max: 200 + max: useTestDatabases ? 1_000_000 : 200 }) )