Verified Commit 21da84ee authored by Aral Balkan's avatar Aral Balkan
Browse files

Add Helmet to Express server

parent 43c5081f
......@@ -6,6 +6,7 @@ const os = require('os')
const childProcess = require('child_process')
const express = require('express')
const helmet = require('helmet')
const morgan = require('morgan')
const AcmeTLS = require('@ind.ie/acme-tls')
const redirectHTTPS = require('redirect-https')
......@@ -71,7 +72,8 @@ class HttpsServer {
// Create an express server to serve the path using Morgan for logging.
const app = express()
app.use(morgan('tiny'))
app.use(helmet()) // Express.js security with HTTP headers.
app.use(morgan('tiny')) // Logging.
app.use(express.static(pathToServe))
let server
......
......@@ -19,10 +19,11 @@
},
"license": "AGPL-3.0-or-later",
"dependencies": {
"@ind.ie/acme-tls": "^1.0.0",
"@ind.ie/nodecert": "^2.0.1",
"ansi-escape-sequences": "^4.1.0",
"express": "^4.16.4",
"@ind.ie/acme-tls": "^1.0.0",
"helmet": "^3.15.1",
"minimist": "^1.2.0",
"morgan": "^1.9.1",
"redirect-https": "^1.3.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment