diff options
Diffstat (limited to '')
-rw-r--r-- | middlewares/helmet.js | 12 |
1 files changed, 12 insertions, 0 deletions
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; |