about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/cgit/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/services/cgit/default.nix b/modules/services/cgit/default.nix
index 39e1633..704d0dc 100644
--- a/modules/services/cgit/default.nix
+++ b/modules/services/cgit/default.nix
@@ -109,7 +109,9 @@ in
       enableACME = true;
       locations = {
         "~* ^.+.(css|png|ico)$" = { root = "${pkgs.cgit}/cgit"; };
-        "/robots.txt".alias = robots-deny;
+        # as per https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md
+        # if you want to map a single file make sure the location starts with a =, e.g =/i.gif instead of /i.gif.
+        "=/robots.txt".alias = robots-deny;
         "/".extraConfig = ''
           include ${pkgs.nginx}/conf/fastcgi_params;
           fastcgi_param CGIT_CONFIG ${pkgs.writeText "cgitrc" cgitrc};