mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 14:21:13 +00:00
Disable CSP when in debug mode. (#743)
This commit is contained in:
parent
cc1308a7d0
commit
920a35383b
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ const [hostname, port] = process.env["LEMMY_UI_HOST"]
|
||||||
const extraThemesFolder =
|
const extraThemesFolder =
|
||||||
process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes";
|
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) {
|
server.use(function (_req, res, next) {
|
||||||
res.setHeader(
|
res.setHeader(
|
||||||
"Content-Security-Policy",
|
"Content-Security-Policy",
|
||||||
|
|
Loading…
Reference in a new issue