feat!: Use / as the default path for the first app #748
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.
Currently, each Load Balanced Web App is created and is asigned
a path of
/{app name}
on the ALB. This makes sense, but thereare some gotchas.
First, your app has to be prepared to handle paths of
/{app name}
.This is probably a little unlikely unless your lucky. Most apps
expect to be run as if they are receiving requests on the root
path
/
(see every tutorial ever) 😂What this change does is it defaults your first app to being hosted
on
/
but at the last evaluated rule. This is probably a moreintuitive default (and we've gotten some customer feedback on this).
Subsequent apps still have to use the path based route.
So:
This change adjusts the priority generator so that "/" is evaluated last.
Customers are still free to change the path in their manifest. They can use
the special "/" path to signify that they want this to be their default route.
Why didn't you just use the default action ?
One kind of odd thing we did here is give the "/" path a really high rule
priority, rather than just setting it as the default route. There are a few
reasons we did that.
and there's really not a great way to update it.
path - it will only require a dpeloyment of the app, rather than then the app
AND the env (which is a different stack).
This change also has some other E2E bug fixes in it (like setting the healthcheck
path by default).
Fixes #663
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.