From 45c51639ca7b294e9819adba8c5dfe99e4e8e5d2 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 28 Nov 2024 16:34:43 +0100 Subject: [PATCH] tsuki/nginx: fix minecraft map hosting --- hosts/tsuki/services/nginx/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hosts/tsuki/services/nginx/default.nix b/hosts/tsuki/services/nginx/default.nix index 268899f..6795809 100644 --- a/hosts/tsuki/services/nginx/default.nix +++ b/hosts/tsuki/services/nginx/default.nix @@ -144,11 +144,12 @@ (host ["testmap"] { root = "/var/lib/mcmap"; locations = { - "~* ^/maps/[^/]*/tiles/[^/]*.json$".extraConfig = '' - error_page 404 =200 /assets/emptyTile.json; + "@empty".return = "204"; + + "~* ^/maps/[^/]*/tiles/".extraConfig = '' + error_page 404 = @empty; gzip_static always; ''; - "~* ^/maps/[^/]*/tiles/[^/]*.png$".tryFiles = "$uri =204"; }; }) (host ["www"] {