Merge pull request #217 from zkldi/zkldi/issue-215-Add-helmet-to-protect-against-various-attacks

add helmet
This commit is contained in:
zkldi
2021-06-30 19:47:31 +01:00
committed by GitHub
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -55,6 +55,7 @@
"express-session": "1.17.2",
"fast-json-stable-hash": "1.0.2",
"fast-xml-parser": "3.19.0",
"helmet": "4.6.0",
"json5": "2.2.0",
"mkdirp": "1.0.4",
"mongodb": "3.6.3",
+7
View File
@@ -35,6 +35,7 @@ specifiers:
express-session: 1.17.2
fast-json-stable-hash: 1.0.2
fast-xml-parser: 3.19.0
helmet: 4.6.0
json5: 2.2.0
mkdirp: 1.0.4
mongodb: 3.6.3
@@ -68,6 +69,7 @@ dependencies:
express-session: 1.17.2
fast-json-stable-hash: 1.0.2
fast-xml-parser: 3.19.0
helmet: 4.6.0
json5: 2.2.0
mkdirp: 1.0.4
mongodb: 3.6.3
@@ -2120,6 +2122,11 @@ packages:
is-stream: 2.0.0
type-fest: 0.8.1
/helmet/4.6.0:
resolution: {integrity: sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==}
engines: {node: '>=10.0.0'}
dev: false
/hosted-git-info/2.8.9:
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
dev: true
+3
View File
@@ -6,6 +6,7 @@ import { integer } from "tachi-common";
import { RedisClient } from "../external/redis/redis";
import { CONFIG, SESSION_SECRET } from "../lib/setup/config";
import connectRedis from "connect-redis";
import helmet from "helmet";
const logger = CreateLogCtx(__filename);
@@ -36,6 +37,8 @@ const userSessionMiddleware = expressSession({
const app: Express = express();
app.use(helmet());
app.use(userSessionMiddleware);
// Most of these options are leveraged from KTAPI