-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat: convenience method for ALB redirects #9913
Conversation
@njlynch Is this something you consider merging? I will then fix the tests. I think the change to jest broke this PR |
Yes, this looks like a nice convenience method. Sorry about the churn with the nodeunit -> jest migration. |
/** | ||
* Add a redirection listener to this load balancer | ||
*/ | ||
public addRedirect(props?: ApplicationLoadBalancerRedirectConfig): ApplicationListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the preferred convention for cases like this; it will also simplify some of the props?.foo
accessors below.
public addRedirect(props?: ApplicationLoadBalancerRedirectConfig): ApplicationListener { | |
public addRedirect(props: ApplicationLoadBalancerRedirectConfig = {}): ApplicationListener { |
}); | ||
|
||
// WHEN | ||
lb.addRedirect({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Slightly more idiomatic usage:
lb.addRedirect({}); | |
lb.addRedirect(); |
@njlynch I fixed the tests and changed the code according to your feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
After the feedback I received for my latest addition of the redirect method to the ÀpplicationLoadBalancerFargateService` I propose a convenience method for the ALB to create redirects.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license