Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit ececd17

Browse files
committed
Improves the security headers
Attempts to fix all the security issues reported by the Mozilla Observatory: https://observatory.mozilla.org/analyze/viz.scrapd.org Fixes #194
1 parent 9fb8263 commit ececd17

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

csp.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
<<<<<<< HEAD
12
const helmet = require('helmet');
23
const uuidv4 = require('uuid/v4');
34

45
// Configuration values mostly come from this talk:
56
// https://pyvideo.org/pybay-2019/browser-security-with-http-headers.html
67
// export default function csp(app) {
78
module.exports = function csp(app) {
9+
=======
10+
import helmet from 'helmet';
11+
import uuidv4 from 'uuid/v4';
12+
13+
// Configuration values mostly come from this talk:
14+
// https://pyvideo.org/pybay-2019/browser-security-with-http-headers.html
15+
export default function csp(app) {
16+
>>>>>>> Improves the security headers
817
// Create a nonce on every request and make it available to other middleware
918
app.use((req, res, next) => {
1019
res.locals.nonce = Buffer.from(uuidv4()).toString('base64');

0 commit comments

Comments
 (0)