Skip to content

Commit

Permalink
Replace infinite redirect with placeholder page (#10300)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnunciato authored Dec 11, 2023
1 parent beb5162 commit 2c85e02
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion content/registry.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
---
redirect_to: /registry/
title: "Pulumi Registry"
readme: |
This page is intentionally left blank, which may seem strange, but is actually necessary because
of how the CloudFront CDN is configured to serve https://www.pulumi.com/registry/.
If we didn't put this page here, requests for "/registry" (sans trailing slash) would prompt S3 to
go looking in the currently deployed bucket for an object named `registry` (which it'd fail to find,
because such an object wouldn't exist), then go looking for an object named `registry/index.html`
(because `index.html` is defined as the bucket's `indexDocument`). On failing to find both, S3 would
return the bucket's `errorDocument` (i.e., our 404 page) and an error code to CloudFront instead --
which CloudFront would finally return to the user.
Instead, by including this document, we give S3 an object to deliver to Cloudfront (our intentionally
blank `registry/index.html`), but allow CloudFront to forward the request on to the Registry, which is
configured to handle all requests for `/registry/*` (including `/registry/index.html`).
More info here:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html#DefaultRootObjectHow
---

0 comments on commit 2c85e02

Please sign in to comment.