Skip to content

Commit

Permalink
Feature/content security policy header (#24)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
IanR01 authored Oct 22, 2024
1 parent 9d2cd39 commit 3527431
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ module.exports = function (app) {
next();
});

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

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

Expand Down

0 comments on commit 3527431

Please sign in to comment.