From 2611ded920a8345922346ed0d43e4efdd94401a1 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 27 Oct 2022 23:56:29 +0200 Subject: Began implementing middlewares, session and auth --- middlewares/helmet.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 middlewares/helmet.js (limited to 'middlewares/helmet.js') diff --git a/middlewares/helmet.js b/middlewares/helmet.js new file mode 100644 index 0000000..5ced2c3 --- /dev/null +++ b/middlewares/helmet.js @@ -0,0 +1,12 @@ +import helmet from "helmet"; + +const myHelmet = helmet({ + contentSecurityPolicy: { + directives: { + ...helmet.contentSecurityPolicy.getDefaultDirectives(), + "script-src": ["'self'", "'unsafe-inline'"], + }, + }, +}); + +export default myHelmet; -- cgit v1.2.3