-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace infinite redirect with placeholder page (#10300)
- Loading branch information
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
--- |