Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Jul 5, 2023
1 parent 8edd417 commit 8f8f36e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import apiRouter from './routes/index.js';

const app = express();

app.use(helmet());
const cspDefaults = helmet.contentSecurityPolicy.getDefaultDirectives();

delete cspDefaults['upgrade-insecure-requests'];

app.use(helmet({ contentSecurityPolicy: { directives: cspDefaults } }));
// app.use(helmet());

if (process.env.NODE_ENV !== 'test') {
app.use(loggerMiddleware);
Expand Down

0 comments on commit 8f8f36e

Please sign in to comment.