We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01f6854 commit 13271ccCopy full SHA for 13271cc
1 file changed
api-gateway/src/middleware/security.ts
@@ -2,9 +2,10 @@ import helmet from "helmet";
2
import cors from "cors";
3
import rateLimit from "express-rate-limit";
4
import { Application } from "express";
5
-import { Service } from "../config";
6
7
export const applySecurityMiddleware = (app: Application) => {
+ app.set('trust proxy', true);
8
+
9
// Apply Helmet with CORS-friendly settings
10
app.use(helmet({
11
crossOriginResourcePolicy: { policy: "cross-origin" },
@@ -26,6 +27,6 @@ export const applySecurityMiddleware = (app: Application) => {
26
27
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
28
legacyHeaders: false,
29
});
-
30
- app.use(limiter);
31
+ // app.use(limiter);
32
};
0 commit comments