diff --git a/nix/hosts/hetznix/services/caddy/vhosts/default.nix b/nix/hosts/hetznix/services/caddy/vhosts/default.nix index 41e605e..902ef55 100644 --- a/nix/hosts/hetznix/services/caddy/vhosts/default.nix +++ b/nix/hosts/hetznix/services/caddy/vhosts/default.nix @@ -2,6 +2,7 @@ imports = [ ./2020.oliverdavies.uk.nix ./bootstrap-with-tailwind.oliverdavies.uk.nix + ./files.oliverdavies.uk.nix ./florida-drupalcamp-tailwind-css.oliverdavies.uk.nix ./luke.oliverdavies.uk.nix ./phpsw-sculpin-demo.oliverdavies.uk.nix diff --git a/nix/hosts/hetznix/services/caddy/vhosts/files.oliverdavies.uk.nix b/nix/hosts/hetznix/services/caddy/vhosts/files.oliverdavies.uk.nix new file mode 100644 index 0000000..fc0a6e4 --- /dev/null +++ b/nix/hosts/hetznix/services/caddy/vhosts/files.oliverdavies.uk.nix @@ -0,0 +1,15 @@ +{ + services.caddy.virtualHosts."files.oliverdavies.uk" = { + useACMEHost = "oliverdavies.uk"; + + extraConfig = '' + file_server { + header Content-Disposition "attachment" + } + + root * /var/www/vhosts/files.oliverdavies.uk + + header X-Robots-Tag "noindex, nofollow" + ''; + }; +}