fix(careers): match retired job redirects case-insensitively

CloudFront does not normalize URI case, so a mixed-case old job link skipped the 301 and missed the lowercase S3 stub.
This commit is contained in:
Adam Moussa 2026-09-24 17:26:47 -04:00
parent 758327f0c6
commit baab84e987
No known key found for this signature in database

View file

@ -18,7 +18,8 @@ function handler(event) {
var request = event.request;
var uri = request.uri;
if (RETIRED_JOB_URIS[uri]) {
// CloudFront does not normalize URI case. The S3 keys are lowercase.
if (RETIRED_JOB_URIS[uri.toLowerCase()]) {
return {
statusCode: 301,
statusDescription: "Moved Permanently",