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.
Now that we have the new version of some of the answers pages deployed, we need to redirect from the original ones. The new ones are genned based on the existing pages and we need to redirect from their old routes to the new route for pages that are being replaced. These redirects will continually get updated as we gradually port more and more of the pages over.
This PR adds the redirects from the old ai answers pages to the new ones that we are replacing by adding an edge lambda that gets invoked by the cloudfront distribution. We are gradually porting over the existing pages and will redirect once they are replaced. There is a file placed at the pulumi.com/answers/redirects.json route which contains a map of {oldURL: newURL}. This file is fetched when
pulumi up
is run so the fetch is not part of the serialized function that becomes part of the lambda code - only the resulting value is part of the code. This is so we are not invoking a fetch of this file whenever the lambda is invoked and it is instead precomputed at deployment time. This PR also adds the answers sitemap to the sitemap-index file as well.This is currently deployed to test. Here is an example of a page we replaced that lived under the /ai/answers route and you should see it successfully redirects now to the new page in the test env: https://www.pulumi-test.io/ai/answers/hCy3E99tc5VjfUqFEGj2GU/adding-custom-headers-with-istio-envoyfilter-kubernetes-tutorial