fix(ops/machines/snix-cache): support old /nar/tvix-castore URLs
Nix clients still might have old .narinfo files cached, containing old NAR URLs. Send a redirect to the new URL. Fixes: #103 Change-Id: Ie3b77e4fdc4be0f982e023f2a2acd3f9f0257f9b Reviewed-on: https://cl.snix.dev/c/snix/+/30291 Autosubmit: Florian Klink <flokli@flokli.de> Tested-by: besadii Reviewed-by: edef <edef@edef.eu>
This commit is contained in:
parent
63d9fcfb0f
commit
6e45456fec
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,11 @@
|
||||||
proxy_cache_use_stale error timeout updating;
|
proxy_cache_use_stale error timeout updating;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
# Rewrite old nar/tvix-castore/…?narsize=… requests to the new URL
|
||||||
|
# Clients keep these paths in their narinfo cache annoyingly long.
|
||||||
|
locations."/nar/tvix-castore".extraConfig = ''
|
||||||
|
rewrite ^/nar/tvix-castore/(.*)$ /nar/snix-castore/$1 redirect;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# use more cores for compression
|
# use more cores for compression
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue