Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add answers redirects #13436

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add answers redirects #13436

wants to merge 4 commits into from

Conversation

sean1588
Copy link
Member

@sean1588 sean1588 commented Nov 26, 2024

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

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants