feat(ops/www/gerrit): backward compatibility to TVL shortlinks

cl.snix.fyi/q/$ID where $ID ≤ 30K will redirect (301) to
cl.tvl.fyi/q/$ID to keep the old links working.

Change-Id: I27b496a1c52a3de3d106292ba7a2931b0f15fa49
Signed-off-by: Ryan Lahfa <raito@lix.systems>
This commit is contained in:
Ryan Lahfa 2025-03-17 13:01:57 +01:00 committed by Florian Klink
parent dd392ef054
commit 073142f796

View file

@ -24,6 +24,11 @@
proxy_set_header Host $host:443;
}
# Retro-compatibility to TVL shortlinks.
location ~ "^/q/([1-2]?[0-9]{1,4}|30000)$" {
return 302 https://cl.tvl.fyi$request_uri;
}
location = /robots.txt {
return 200 'User-agent: *\nAllow: /';
}