summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-11-02 14:24:48 +0100
committermakefu <github@syntax-fehler.de>2017-11-02 14:24:48 +0100
commit4baad9d4226f15ff1ff326ebcb36fc1bd83a98c5 (patch)
tree4c68d68d78903f12a681e57051ba2b420099a00c /krebs/3modules
parent2e39f7b3d1805346e067bdc7236bd7dfe87381a2 (diff)
parent6934b5d83f245b723cf7d685d7ab0a758947bdc8 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/git.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 610c20bb4..ba0924681 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -420,7 +420,16 @@ let
];
locations."/".extraConfig = ''
include ${pkgs.nginx}/conf/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
+ fastcgi_param SCRIPT_FILENAME ${pkgs.writeDash "cgit-wrapper" ''
+ set -efu
+ exec 3>&1
+ ${pkgs.cgit}/cgit/cgit.cgi "$@" 2>&1 >&3 3>&- \
+ | ${pkgs.gnused}/bin/sed \
+ '
+ \|^${pkgs.cgit}/cgit/cgit.cgi: Relink |d
+ '
+ exec 3>&-
+ ''};
fastcgi_param PATH_INFO $uri;
fastcgi_param QUERY_STRING $args;
fastcgi_param HTTP_HOST $server_name;