mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
Test/prevent server block on rate limit (#432)
This commit is contained in:
12
src/main.ts
12
src/main.ts
@ -21,18 +21,6 @@ async function bootstrap() {
|
||||
|
||||
app.use(new RequestContextMiddleware().use);
|
||||
|
||||
app.use((req, res, next) => {
|
||||
console.log(
|
||||
'Real IP:',
|
||||
req.ip,
|
||||
req.headers['x-forwarded-for'],
|
||||
req.connection.remoteAddress,
|
||||
);
|
||||
next();
|
||||
});
|
||||
|
||||
// app.getHttpAdapter().getInstance().set('trust proxy', 1);
|
||||
|
||||
app.use(
|
||||
helmet({
|
||||
contentSecurityPolicy: false,
|
||||
|
Reference in New Issue
Block a user