mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Move ratelimitMiddleware below metricsMiddleware, try adding a stricter ratelimit
This commit is contained in:
parent
64370c23e3
commit
218604aa56
1 changed files with 6 additions and 1 deletions
|
|
@ -178,7 +178,6 @@ const publicFiles = serveStatic({ root: './public/' });
|
|||
const staticFiles = serveStatic({ root: './static/' });
|
||||
|
||||
app.use('*', cacheControlMiddleware({ noStore: true }));
|
||||
app.use('*', rateLimitMiddleware(300, Time.minutes(5), false));
|
||||
|
||||
app.use('/api/*', metricsMiddleware, paginationMiddleware, logger(debug));
|
||||
app.use('/.well-known/*', metricsMiddleware, logger(debug));
|
||||
|
|
@ -188,6 +187,12 @@ app.use('/oauth/*', metricsMiddleware, logger(debug));
|
|||
app.get('/api/v1/streaming', metricsMiddleware, streamingController);
|
||||
app.get('/relay', metricsMiddleware, relayController);
|
||||
|
||||
app.use(
|
||||
'*',
|
||||
rateLimitMiddleware(30, Time.seconds(5), false),
|
||||
rateLimitMiddleware(300, Time.minutes(5), false),
|
||||
);
|
||||
|
||||
app.use(
|
||||
'*',
|
||||
cspMiddleware(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue