make redirects to latest versions of CB curriculum use 302 status code #35716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Hannah discovered that the 404 page on curriculum builder links to https://curriculum.code.org/csp-current/, which was redirecting to /csp-19/ rather than /csp-20/ (see discussion in slack). The problem is that we are using a
301 Moved Permanently
redirect, which some browsers cache indefinitely, causing some users to continue to be redirected to the old version of the curriculum after a new one is marked as current.Description
Use a
302 Moved Temporarily
redirect from the urls listed below to the latest version of the specified curriculum, so that browsers will not cache it.This fix may be moot, since we hope to be off of curriculum builder by this time next year, which is the next time these links would change. But the fix seems straightforward, so it seems better to do it than not to.
Testing Story
Ran the script locally, then verified each of the following links to go the right place with 302 status code:
Also verified that the updated config looks correct in S3:
Reviewer Checklist: