summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-05-03 12:28:46 +0200
committerlassulus <git@lassul.us>2023-05-03 12:28:46 +0200
commit194781fa5eb2fd5e9be3ac4fa57872659fec512b (patch)
treea56002268e5616b5afbfff7aa53d5c16f2cddd1b
parent46dcb4749a957ad8701cb06794420cb1667c3a38 (diff)
kpaste: allow override of Content-Type
-rw-r--r--krebs/5pkgs/simple/kpaste/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/kpaste/default.nix b/krebs/5pkgs/simple/kpaste/default.nix
index 9820c931d..1c0225af7 100644
--- a/krebs/5pkgs/simple/kpaste/default.nix
+++ b/krebs/5pkgs/simple/kpaste/default.nix
@@ -1,6 +1,7 @@
{ curl, gnused, writeDashBin }:
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|}'
''