diff options
author | Vincent Ambo <mail@tazj.in> | 2021-04-01T17·35+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-04-01T18·00+0000 |
commit | d2376e24d1084146bb1ee20139fe3dd575c4c546 (patch) | |
tree | f8f80bf48781676d0a0ac746fdc7dc23316f260e | |
parent | ab7e752b4a4fb48cdf5135adc54fc4dd74901f2f (diff) |
fix(tazjin/blog): Make redirects from old links permanent r/2391
Change-Id: I41d71f9aae7e64bdfef8f2b7142d13009b216eaa Reviewed-on: https://cl.tvl.fyi/c/depot/+/2752 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
-rw-r--r-- | users/tazjin/blog/default.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/users/tazjin/blog/default.nix b/users/tazjin/blog/default.nix index d2f04aaea574..2232be273629 100644 --- a/users/tazjin/blog/default.nix +++ b/users/tazjin/blog/default.nix @@ -52,8 +52,7 @@ in { # Generate embeddable nginx configuration for redirects from old post URLs oldRedirects = lib.concatStringsSep "\n" (map (post: '' location ~* ^(/en)?/${post.oldKey} { - # TODO(tazjin): 301 once this works - return 302 https://tazj.in/blog/${post.key}; + return 301 https://tazj.in/blog/${post.key}; } '') (filter (hasAttr "oldKey") posts)); } |