diff --git a/hosts/www/nginx.nix b/hosts/www/nginx.nix index ea63c17..804c95a 100644 --- a/hosts/www/nginx.nix +++ b/hosts/www/nginx.nix @@ -84,9 +84,15 @@ in autoindex on; ''; }; - "~ ^/calendars/[^/]+\.ics$" = { - root = "/srv/http/ics"; - tryFiles = "$uri $uri/ $uri.ics =404"; + "~ ^/calendar/([^/]+\.ics)$" = { + alias = "/srv/http/calendars/$1"; + extraConfig = '' + add_header Cache-Control "no-cache"; + types { + text/calendar ics; + } + default_type text/calendar; + ''; }; }; };