Skip to content

Commit 1b6f0be

Browse files
authored
fix for issue with ALB forwarder when no HOSTS defined (#1019)
1 parent e3412cd commit 1b6f0be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/deployments/runtime/src/alb-to-alb-target/alb-target-record-monitor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const createListenerRule = async (
100100
ruleParams.Conditions.push(pathConfig);
101101
}
102102

103-
if (hosts.length > 0) {
103+
if (hosts?.length > 0) {
104104
const hostConfig = {
105105
Field: 'host-header',
106106
Values: hosts,
@@ -131,7 +131,7 @@ const updateListenerRule = async (ruleArn: string, paths: string[], hosts: strin
131131
ruleParams?.Conditions?.push(pathConfig);
132132
}
133133

134-
if (hosts.length > 0) {
134+
if (hosts?.length > 0) {
135135
const hostConfig = {
136136
Field: 'host-header',
137137
Values: hosts,

0 commit comments

Comments
 (0)