Skip to content

Commit

Permalink
fix: FORMS-1303 restrict rate limit to api routes (#1524)
Browse files Browse the repository at this point in the history
The express rate limiter is now applied globally, so that all routes are included. However, it needs to be restricted to only the API - the Vue files, etc, should not be involved in the rate limiting.
  • Loading branch information
WalterMoar authored Oct 23, 2024
1 parent 75daa29 commit 5f754dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ app.use((_req, res, next) => {
}
});

app.use(rateLimiter);
app.use(config.get('server.basePath') + config.get('server.apiPath'), rateLimiter);

// Frontend configuration endpoint
apiRouter.use('/config', (_req, res, next) => {
Expand Down

0 comments on commit 5f754dc

Please sign in to comment.