Set up helmet

This commit is contained in:
navaneeth 2021-08-01 15:01:29 +05:30
parent f5ceec8c54
commit 08eab4be65
3 changed files with 17 additions and 0 deletions

View file

@ -27,6 +27,7 @@
"dotenv": "^10.0.0",
"futoin-hkdf": "^1.4.2",
"got": "^11.8.2",
"helmet": "^4.6.0",
"humps": "^2.0.1",
"ioredis": "^4.27.6",
"joi": "^17.4.1",
@ -6723,6 +6724,14 @@
"he": "bin/he"
}
},
"node_modules/helmet": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz",
"integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/highlight.js": {
"version": "10.7.3",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",
@ -18853,6 +18862,11 @@
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
},
"helmet": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz",
"integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg=="
},
"highlight.js": {
"version": "10.7.3",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",

View file

@ -45,6 +45,7 @@
"dotenv": "^10.0.0",
"futoin-hkdf": "^1.4.2",
"got": "^11.8.2",
"helmet": "^4.6.0",
"humps": "^2.0.1",
"ioredis": "^4.27.6",
"joi": "^17.4.1",

View file

@ -1,5 +1,6 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import * as helmet from 'helmet';
const fs = require('fs');
declare var TOOLJET_VERSION;
@ -12,6 +13,7 @@ async function bootstrap() {
await app.setGlobalPrefix('api');
await app.enableCors();
app.use(helmet());
const port = parseInt(process.env.PORT) || 3000;