From d2376e24d1084146bb1ee20139fe3dd575c4c546 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 1 Apr 2021 19:35:20 +0200 Subject: fix(tazjin/blog): Make redirects from old links permanent Change-Id: I41d71f9aae7e64bdfef8f2b7142d13009b216eaa Reviewed-on: https://cl.tvl.fyi/c/depot/+/2752 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/blog/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'users/tazjin/blog') 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)); } -- cgit 1.4.1