Skip to content

Commit

Permalink
fix(app.ts): cSP error fix
Browse files Browse the repository at this point in the history
Fixing the CSP errors by moving around helmet code

fix #566
  • Loading branch information
waterweasel4 committed Jan 27, 2021
1 parent 801c9a3 commit b6a02f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ app.use(
etag: false,
})
);
app.use(helmet());
app.use(bodyParser.json({ limit: '2mb' }));
app.use(bodyParser.urlencoded({ extended: true }));
const serverPort = process.env.PORT || 5000;
Expand All @@ -56,7 +57,6 @@ app.listen(serverPort, () =>
console.info(`Server running on ${serverIpAddress}:${serverPort}`)
);

app.use(helmet());
app.use(
helmet.contentSecurityPolicy({
directives: {
Expand Down

0 comments on commit b6a02f8

Please sign in to comment.