mirror of
https://github.com/Sea-Haven-Industries/seahaven-site.git
synced 2026-10-02 11:53:13 +00:00
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:
parent
758327f0c6
commit
baab84e987
1 changed files with 2 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue