[mirotalk] - add helmet

This commit is contained in:
Miroslav Pejic
2021-08-17 22:38:13 +02:00
parent 24410e59ac
commit 2d49d58ddd
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@
"cors": "^2.8.5",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"helmet": "^4.6.0",
"ngrok": "^4.0.1",
"socket.io": "^4.1.2",
"swagger-ui-express": "^4.1.6",
+3
View File
@@ -12,6 +12,7 @@ dependencies: {
cors : https://www.npmjs.com/package/cors
dotenv : https://www.npmjs.com/package/dotenv
express : https://www.npmjs.com/package/express
helmet : https://www.npmjs.com/package/helmet
ngrok : https://www.npmjs.com/package/ngrok
socket.io : https://www.npmjs.com/package/socket.io
swagger : https://www.npmjs.com/package/swagger-ui-express
@@ -42,11 +43,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
require('dotenv').config();
const compression = require('compression');
const helmet = require('helmet');
const express = require('express');
const cors = require('cors');
const path = require('path');
const app = express();
app.use(helmet()); // The X-powered header is sent within the response header. (unnecessary)
app.use(cors()); // Enable All CORS Requests for all origins
app.use(compression()); // Compress all HTTP responses using GZip