Skip to content

Commit

Permalink
Update Helmet content security policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1morel committed Dec 18, 2023
1 parent 91127b7 commit 3e3b04e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ app.use(compression());
app.use(cors(DEFAULTCORS));
app.use(express.json({ limit: config.get('server.bodyLimit') }));
app.use(express.urlencoded({ extended: true }));
app.use(helmet());
app.use(
helmet({
contentSecurityPolicy: {
directives: {
'default-src': [
"'self'", // eslint-disable-line
new URL(config.get('server.oidc.serverUrl')).origin
]
}
}
})
);

// Skip if running tests
if (process.env.NODE_ENV !== 'test') {
Expand Down

0 comments on commit 3e3b04e

Please sign in to comment.