Skip to content

Add logic for mapping paths to S3 keys#4

Merged
jonathansick merged 14 commits intomainfrom
edition-url-rewrites
Dec 29, 2021
Merged

Add logic for mapping paths to S3 keys#4
jonathansick merged 14 commits intomainfrom
edition-url-rewrites

Conversation

@jonathansick
Copy link
Copy Markdown
Member

@jonathansick jonathansick commented Dec 2, 2021

This takes into account the /v/ prefixes for LTD editions, and properly maps request URLs to paths in the S3 bucket.

This code also redirects users to a / path if they request a directory, and no corresponding object exists in S3.

This makes is easier to add/modify rules to use a new team since all of
the teams for a relevant organization are now serialized in the cookie.
Don't map bare paths to index.html, instead check with S3 that the file
doesn't exist and then issue a 301 to redirect the browser to a / path.
This is necessary for relative paths to resolve properly.
@jonathansick jonathansick merged commit 80a5d43 into main Dec 29, 2021
@jonathansick jonathansick deleted the edition-url-rewrites branch December 29, 2021 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant