Closed peterbe closed 4 years ago
In Project Milton, the cli
in stumptown-renderer
produces a index.redirect
for every directory that needs a redirect. For example a file like stumptown-renderer/client/build/en-US/docs/XUL:Attribute:enableColumnDrag/index.redirect
that simply contains this: /docs/en/XUL/Attribute/enableColumnDrag
So the stumptown-deployer just needs to loop over the .redirect files too and create an empty S3 key with redirect metadata.
Any objections @escattone ? Or perhaps the question is premature without bigger context?
I fumbled on the PR description and forgot to mention this issue. But https://github.com/mdn/stumptown-deployer/pull/13 resolves this issue.
The way it works is that stumptown-deployer upload ...
can recognize index.redirect
files and it opens its content and creates a index.html
in S3 with the appropriate redirect meta tag.
One thing I noticed when working in Project Milton is that Kuma contains a LOT of redirects. About 70,000 in fact. That's so many that it would suck to put them all in one massive file and try to upload that to a Lambda@Edge function.