Skip to content

Commit

Permalink
Fix duplicate listener names
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallJoeMaher authored Nov 18, 2023
1 parent 6b26504 commit c5f85c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdk/lib/app-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class AppStack extends cdk.Stack {
});

if (!production) {
fargateService.listener.addAction("ListenerRule", {
fargateService.listener.addAction("RobotsListenerRule", {
priority: 1,
conditions: [elbv2.ListenerCondition.pathPatterns(["/robots.txt"])],
action: elbv2.ListenerAction.fixedResponse(200, {
Expand All @@ -166,7 +166,7 @@ export class AppStack extends cdk.Stack {
}),
});

fargateService.listener.addAction("ListenerRule", {
fargateService.listener.addAction("SitemapListenerRule", {
priority: 2,
conditions: [elbv2.ListenerCondition.pathPatterns(["/sitemap.xml"])],
action: elbv2.ListenerAction.fixedResponse(404, {
Expand Down

0 comments on commit c5f85c5

Please sign in to comment.