randydev commited on
Commit
51cd2da
·
verified ·
1 Parent(s): 7e5556e

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +12 -4
index.js CHANGED
@@ -44,6 +44,7 @@ import path from "path";
44
  import sharp from "sharp";
45
  import bodyParser from 'body-parser';
46
  import swaggerJsDoc from 'swagger-jsdoc';
 
47
 
48
  // routes
49
  import { GempaRoutes } from './plugins/gempa.js';
@@ -67,19 +68,26 @@ function _0x8e5f(){const _0x47a684=['21328MwnItu','akeno_','2HGYaRq','7539MDsoUT
67
  app.use(async (req, res, next) => {
68
  await CheckMilWares.handle(req, res, next);
69
  });
 
 
 
 
 
 
 
 
70
 
71
  app.use("/api/v1/", apiLimiter);
72
- app.disable("x-powered-by");
73
- app.disable("link")
74
-
75
  app.use(bodyParser.json());
 
76
  app.use(
77
  bodyParser.urlencoded({
78
  extended: true,
79
  })
80
  );
 
 
81
 
82
- app.use(express.static('public'));
83
 
84
  // routes
85
  app.use(GeminiRoutes);
 
44
  import sharp from "sharp";
45
  import bodyParser from 'body-parser';
46
  import swaggerJsDoc from 'swagger-jsdoc';
47
+ import helmet from "helmet";
48
 
49
  // routes
50
  import { GempaRoutes } from './plugins/gempa.js';
 
68
  app.use(async (req, res, next) => {
69
  await CheckMilWares.handle(req, res, next);
70
  });
71
+ app.use(helmet({ dnsPrefetchControl: false }));
72
+ app.use(
73
+ express.static("public", {
74
+ setHeaders: (res) => {
75
+ res.removeHeader("Link");
76
+ }
77
+ })
78
+ );
79
 
80
  app.use("/api/v1/", apiLimiter);
 
 
 
81
  app.use(bodyParser.json());
82
+ app.use(express.static('public'));
83
  app.use(
84
  bodyParser.urlencoded({
85
  extended: true,
86
  })
87
  );
88
+ app.disable("x-powered-by");
89
+ app.disable("link")
90
 
 
91
 
92
  // routes
93
  app.use(GeminiRoutes);