From 19f2b0ae662dcc298e2b512c9f776e0447641958 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 22 May 2023 12:23:47 +0200 Subject: [PATCH] default to empty object in helmet --- backend/src/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/server.js b/backend/src/server.js index 86cc2a753..d0b205035 100644 --- a/backend/src/server.js +++ b/backend/src/server.js @@ -85,7 +85,9 @@ const createServer = (options) => { // TODO: this exception is required for the graphql playground, since the playground loads external resources // See: https://github.com/graphql/graphql-playground/issues/1283 app.use( - helmet(CONFIG.DEBUG && { contentSecurityPolicy: false, crossOriginEmbedderPolicy: false }), + helmet( + (CONFIG.DEBUG && { contentSecurityPolicy: false, crossOriginEmbedderPolicy: false }) || {}, + ), ) app.use('/.well-known/', webfinger()) app.use(express.static('public'))