]> Untitled Git - lemmy-ui.git/commitdiff
Disable CSP when in debug mode. (#743)
authorDessalines <dessalines@users.noreply.github.com>
Tue, 16 Aug 2022 20:39:09 +0000 (16:39 -0400)
committerGitHub <noreply@github.com>
Tue, 16 Aug 2022 20:39:09 +0000 (20:39 +0000)
src/server/index.tsx

index ebaa9477633863e3df5113704215584c9db35a40..fbac4ee1ac72e67d92d70add2b08a5251ddf7612 100644 (file)
@@ -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",