diff --git a/package.json b/package.json index 5e3535b9..fdc1dfda 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "analyze": "webpack --mode=none", "prebuild:dev": "yarn clean && node generate_translations.js", - "build:dev": "webpack --env LEMMY_UI_DISABLE_CSP=true --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=development", + "build:dev": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=development", "prebuild:prod": "yarn clean && node generate_translations.js", "build:prod": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=production", "clean": "yarn run rimraf dist", diff --git a/src/server/index.tsx b/src/server/index.tsx index 458d7f03..3b9352bf 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -29,7 +29,11 @@ server.use( ); server.use(setCacheControl); -if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) { +if ( + !process.env["LEMMY_UI_DISABLE_CSP"] && + !process.env["LEMMY_UI_DEBUG"] && + process.env["NODE_ENV"] !== "development" +) { server.use(setDefaultCsp); }