Skip to content

Commit

Permalink
helmet middleware added
Browse files Browse the repository at this point in the history
  • Loading branch information
tweiss9 committed May 27, 2024
1 parent 0f6a0d9 commit 158939c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const axios = require("axios");
const path = require("path");
const functions = require("firebase-functions");
const cors = require("cors");
const helmet = require('helmet');
const app = express();
const { sendEmail } = require("./sendEmail.js");

Expand All @@ -27,6 +28,7 @@ app.use(
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, "")));
app.use(helmet());

app.use((req, res, next) => {
const userAgent = req.headers["user-agent"];
Expand Down
9 changes: 9 additions & 0 deletions functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"express": "^4.18.2",
"firebase-admin": "^12.1.0",
"firebase-functions": "^5.0.1",
"helmet": "^7.1.0",
"nodemailer": "^6.9.7"
},
"devDependencies": {
Expand Down

0 comments on commit 158939c

Please # to comment.