Skip to content

Redirect URI without trailing slash to fix broken HTML assets#38

Open
geftactics wants to merge 1 commit intoaws-samples:mainfrom
geftactics:patch-1
Open

Redirect URI without trailing slash to fix broken HTML assets#38
geftactics wants to merge 1 commit intoaws-samples:mainfrom
geftactics:patch-1

Conversation

@geftactics
Copy link

Original code has a slight issue that causes HTML assets to not load correctly.

Example: http://domain/subdir

By modifying the else if statement to perform a 302 redirect, and append a trailing slash, the next time our CloudWatch function is called, it will be handled by the first if statement, with the browser requesting HTML assets from the correct location, as the base url now has the trailing slash in place.

Fixes an issue where URI without trailing slash causes HTML assets to fail to load. 302 redirect appending a trailing slash fixes.
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