Skip to content

Commit

Permalink
fix(albfs): fix logic for redirectHTTP and protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
briancaffey committed Jul 5, 2021
1 parent 907cb41 commit 41ff18a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/django-ecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as patterns from '@aws-cdk/aws-ecs-patterns';
import * as logs from '@aws-cdk/aws-logs';
import * as route53 from '@aws-cdk/aws-route53';
import * as route53targets from '@aws-cdk/aws-route53-targets';
import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
import * as s3 from '@aws-cdk/aws-s3';
import * as cdk from '@aws-cdk/core';
import { RdsPostgresInstance } from './common/database';
Expand Down Expand Up @@ -275,7 +276,8 @@ export class DjangoEcs extends cdk.Construct {
securityGroups: [appSecurityGroup],
desiredCount: 1,
assignPublicIp: true,
redirectHTTP: true,
redirectHTTP: !!props.domainName ?? false,
protocol: props.domainName ? elbv2.ApplicationProtocol.HTTPS : elbv2.ApplicationProtocol.HTTP,
certificate: props.domainName ? certificate : undefined,
});

Expand Down

0 comments on commit 41ff18a

Please sign in to comment.