1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 00:06:26 -04:00

fix mutable shortlinks (#903)

they were missing a response status code.

use 302 since the target URL is decidedly not permanent:
https://datatracker.ietf.org/doc/html/rfc9110#name-302-found
This commit is contained in:
Valentin Gagarin 2024-02-06 21:42:51 +01:00 committed by GitHub
parent e0e2f95866
commit 2720a4121e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,7 +46,7 @@ let
sed '/^#/d;/^$/d;s#^\(.*\) \(.*\) #/manual/nix/${version}\1 /manual/nix/${version}\2 #g' ${src version}/doc/manual/_redirects >> $out/_redirects
'';
shortlink = release: version: ''
echo /nix/manual/${release} /nix/manual/${version} >> $out/_redirects
echo /nix/manual/${release} /nix/manual/${version} 302 >> $out/_redirects
'';
versions = with pkgs.lib; lists.unique (attrsets.attrValues releases);
in