Skip to content

Commit 76d31c1

Browse files
updated
1 parent e47bcc5 commit 76d31c1

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@
5151
"color": "FF00FF",
5252
"footerText": null,
5353
"footerUrl": "logo.png"
54+
},
55+
"requestLogger": {
56+
"enabled": true
5457
}
5558
}

server.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ const {
126126
checkHeaderMiddleware,
127127
httpsSecurityMiddleware,
128128
discordLogs,
129-
setCacheHeaders,
130-
autoLoader,
129+
applyAutoMiddlewares,
131130
WSChat,
132131
} = require("npm-package-nodejs-utils-lda");
133132

@@ -147,17 +146,12 @@ const dia = date.getDate().toString().padStart(2, "0") - 1;
147146
const dia7 = (date.getDate() - 7).toString().padStart(2, "0") - 1;
148147
const mes = (date.getMonth() + 1).toString().padStart(2, "0");
149148
const ano = date.getFullYear();
150-
app.use((req, res, next) => {
151-
setCacheHeaders(req, res, next);
152-
});
153-
app.use(express.urlencoded({ extended: true }));
154-
app.use(express.json());
155149

156-
app.use(setCacheHeaders);
157-
app.use(httpsSecurityMiddleware);
150+
app.use(express.urlencoded({ extended: true }));
151+
app.use(express.json())
158152
app.use(ddosModule().express);
159-
checkHeaderMiddleware(app);
160-
autoLoader(app);
153+
applyAutoMiddlewares(app);
154+
161155
WSChat(); // starts HTTP + WS server on port 8080
162156

163157
var server = app.listen(porta || 0, hostname, function () {

0 commit comments

Comments
 (0)