From 20da4c8358951abb92155bf5cd7c7fb8e6dfa9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sat, 3 Dec 2022 10:26:17 +0100 Subject: [PATCH] Fix jxl-polyfill patch on akkoma --- akkoma/default.nix | 2 +- akkoma/jxl-polyfill.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 akkoma/jxl-polyfill.patch diff --git a/akkoma/default.nix b/akkoma/default.nix index b7fb630..679dd15 100644 --- a/akkoma/default.nix +++ b/akkoma/default.nix @@ -20,7 +20,7 @@ repo = "akkoma"; inherit (source) rev sha256; }; - patches = [./akkoma.patch]; + patches = [./akkoma.patch ./jxl-polyfill.patch]; }; in beamPackages.mixRelease rec { diff --git a/akkoma/jxl-polyfill.patch b/akkoma/jxl-polyfill.patch new file mode 100644 index 0000000..fcc10f4 --- /dev/null +++ b/akkoma/jxl-polyfill.patch @@ -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"