Add logic for mapping paths to S3 keys#4
Merged
jonathansick merged 14 commits intomainfrom Dec 29, 2021
Merged
Conversation
Stop using the variation "ltdproxy" for consistency.
It seems that S3 is always returning text/html as the content type? Not sure why yet. This is an override of the header based on file extensions.
ab14a22 to
eb97944
Compare
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.
eb97944 to
b1b1220
Compare
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.
31fbafe to
6b175aa
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.