auto-smart-security 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,10 @@ function applySecurity(app, options) {
20
20
  app.set('trust proxy', options.trustProxy);
21
21
  }
22
22
  /** ================= HELMET ================= */
23
- app.use((0, helmet_1.default)());
23
+ app.use((0, helmet_1.default)({
24
+ crossOriginResourcePolicy: false, // 🔥
25
+ crossOriginOpenerPolicy: false, // disable API
26
+ }));
24
27
  /** ================= BLACKLIST STORE ================= */
25
28
  const blacklist = options.blacklist?.store ??
26
29
  new memory_store_1.MemoryBlacklistStore(options.staticBlacklist, options.blacklistTTL);
@@ -48,6 +51,7 @@ function applySecurity(app, options) {
48
51
  return next();
49
52
  const ip = (0, utils_1.getClientIP)(req);
50
53
  const url = req.originalUrl;
54
+ console.log('url =========>', url, ip);
51
55
  /** 1️⃣ Blacklist */
52
56
  if (await blacklist.isBlocked(ip)) {
53
57
  return res.status(403).send('Access denied');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-smart-security",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Production-ready security middleware for Express / NestJS",
5
5
  "author": "Hai Vinh <haivinhinspirit@gmail.com>",
6
6
  "main": "dist/index.js",