Skip to content

Commit

Permalink
[mirotalkbro] - add helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 31, 2025
1 parent 2d40a10 commit 428194e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license For open source under AGPL-3.0
* @license For private project or commercial purposes contact us at: [email protected]
* @author Miroslav Pejic - [email protected]
* @version 1.1.21
* @version 1.1.22
*/

require('dotenv').config();
Expand All @@ -17,6 +17,7 @@ const { auth, requiresAuth } = require('express-openid-connect');
const compression = require('compression');
const cors = require('cors');
const express = require('express');
const helmet = require('helmet');
const app = express();
const path = require('path');
const fs = require('fs');
Expand Down Expand Up @@ -180,6 +181,8 @@ const html = {
disconnect: path.join(__dirname, '../', 'public/views/disconnect.html'),
};

app.use(helmet.xssFilter()); // Enable XSS protection
app.use(helmet.noSniff()); // Enable content type sniffing prevention
app.use(cors(corsOptions));
app.use(compression());
app.use(express.json()); // Api parse body data as json
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkbro",
"version": "1.1.21",
"version": "1.1.22",
"description": "P2P WebRTC audio, video and screen live broadcast",
"main": "app/server.js",
"scripts": {
Expand Down Expand Up @@ -29,6 +29,7 @@
"dotenv": "^16.4.7",
"express": "^4.21.2",
"express-openid-connect": "^2.17.1",
"helmet": "^8.0.0",
"js-yaml": "^4.1.0",
"ngrok": "^5.0.0-beta.2",
"socket.io": "^4.8.1",
Expand Down

0 comments on commit 428194e

Please sign in to comment.