Skip to content

Commit 13271cc

Browse files
committed
in api gateway removed ratelimit and added trust proxy
1 parent 01f6854 commit 13271cc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

api-gateway/src/middleware/security.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import helmet from "helmet";
22
import cors from "cors";
33
import rateLimit from "express-rate-limit";
44
import { Application } from "express";
5-
import { Service } from "../config";
65

76
export const applySecurityMiddleware = (app: Application) => {
7+
app.set('trust proxy', true);
8+
89
// Apply Helmet with CORS-friendly settings
910
app.use(helmet({
1011
crossOriginResourcePolicy: { policy: "cross-origin" },
@@ -26,6 +27,6 @@ export const applySecurityMiddleware = (app: Application) => {
2627
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
2728
legacyHeaders: false,
2829
});
29-
30-
app.use(limiter);
30+
31+
// app.use(limiter);
3132
};

0 commit comments

Comments
 (0)