Merge pull request #51 from DarkKirb/fix-pleroma-fe-jxl-polyfill

fix pleroma fe jxl polyfill
This commit is contained in:
Charlotte 🦝 Delenk 2022-12-03 10:47:23 +01:00 committed by GitHub
commit 18d78af1a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -20,7 +20,7 @@
repo = "akkoma"; repo = "akkoma";
inherit (source) rev sha256; inherit (source) rev sha256;
}; };
patches = [./akkoma.patch]; patches = [./akkoma.patch ./jxl-polyfill.patch];
}; };
in in
beamPackages.mixRelease rec { beamPackages.mixRelease rec {

18
akkoma/jxl-polyfill.patch Normal file
View file

@ -0,0 +1,18 @@
diff --git a/lib/pleroma/web/plugs/http_security_plug.ex b/lib/pleroma/web/plugs/http_security_plug.ex
index d1e6cc9d3..4e29355c5 100644
--- a/lib/pleroma/web/plugs/http_security_plug.ex
+++ b/lib/pleroma/web/plugs/http_security_plug.ex
@@ -113,12 +113,7 @@ defp csp_string do
connect_src
end
- script_src =
- if Config.get(:env) == :dev do
- "script-src 'self' 'unsafe-eval'"
- else
- "script-src 'self'"
- end
+ script_src = "script-src 'self' 'unsafe-eval'"
report = if report_uri, do: ["report-uri ", report_uri, ";report-to csp-endpoint"]
insecure = if scheme == "https", do: "upgrade-insecure-requests"