From: Dessalines Date: Tue, 16 Aug 2022 20:39:09 +0000 (-0400) Subject: Disable CSP when in debug mode. (#743) X-Git-Url: http://these/git/readmes/%24%7B%60data:application/README.md?a=commitdiff_plain;h=920a35383b81881edf8ef47eac9544cbb3ff8b79;p=lemmy-ui.git Disable CSP when in debug mode. (#743) --- diff --git a/src/server/index.tsx b/src/server/index.tsx index ebaa947..fbac4ee 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -29,7 +29,7 @@ const [hostname, port] = process.env["LEMMY_UI_HOST"] const extraThemesFolder = process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes"; -if (!process.env["LEMMY_UI_DISABLE_CSP"]) { +if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) { server.use(function (_req, res, next) { res.setHeader( "Content-Security-Policy",