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

Compare commits

..

2 commits

Author SHA1 Message Date
Valentin Gagarin def6533158
Merge 530a0edbfd into 2720a4121e 2024-02-07 09:37:53 +11:00
Valentin Gagarin 2720a4121e
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
2024-02-06 21:42:51 +01:00

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