From f2b1b9d9a12a4664611f7f753a257ef32c763a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 3 May 2023 12:34:57 +0200 Subject: [PATCH] feat(panoptikon): kpaste text/plain --- lib/panoptikon.nix | 2 +- packages/kpaste.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/panoptikon.nix b/lib/panoptikon.nix index 6a23a24..659cae5 100644 --- a/lib/panoptikon.nix +++ b/lib/panoptikon.nix @@ -31,7 +31,7 @@ nick ? ''"$PANOPTIKON_WATCHER"-watcher'', }: pkgs.writers.writeDash "kpaste-irc-reporter" '' - ${niveumPackages.kpaste}/bin/kpaste \ + KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \ | ${pkgs.gnused}/bin/sed -n "${ if retiolumLink then "2" diff --git a/packages/kpaste.nix b/packages/kpaste.nix index 54d7f28..0d9053d 100644 --- a/packages/kpaste.nix +++ b/packages/kpaste.nix @@ -4,6 +4,7 @@ writers, }: writers.writeDashBin "kpaste" '' - ${curl}/bin/curl -sS http://p.r --data-binary @"''${1:--}" | + ${curl}/bin/curl -sS http://p.r --data-binary @"''${1:--}" \ + -H "Content-Type-Override: ''${KPASTE_CONTENT_TYPE-}" ${gnused}/bin/sed '$ {p;s|http://p.r|https://p.krebsco.de|}' ''