Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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