Skip to content

Commit 3527431

Browse files
authored
Feature/content security policy header (#24)
* add CSP header * debugging CSP header, allow all * move setHeader to routes.js * finish with next() * set CSP-header to *.amsterdam.nl * add *.openstad.org to CSP header
1 parent 9d2cd39 commit 3527431

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routes/routes.js

+4
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ module.exports = function (app) {
154154
next();
155155
});
156156

157+
app.use((req, res, next) => {
158+
res.setHeader("Content-Security-Policy", "frame-ancestors 'self' *.amsterdam.nl *.openstad.org")
159+
next()
160+
})
157161

158162
app.get('/', authLocal.index);
159163

0 commit comments

Comments
 (0)