Skip to content

Commit

Permalink
remove setting TLS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
robertd committed Mar 3, 2021
1 parent 89533c3 commit dc18d74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/domain-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class DomainName extends Resource implements IDomainName {
regionalCertificateArn: edge ? undefined : props.certificate.certificateArn,
endpointConfiguration: { types: [endpointType] },
mutualTlsAuthentication: mtlsConfig,
securityPolicy: props.securityPolicy ?? SecurityPolicy.TLS_1_2,
securityPolicy: props.securityPolicy,
});

this.domainName = resource.ref;
Expand Down
5 changes: 2 additions & 3 deletions packages/@aws-cdk/aws-apigateway/test/domains.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ABSENT } from '@aws-cdk/assert';
import '@aws-cdk/assert/jest';
import * as acm from '@aws-cdk/aws-certificatemanager';
import { Bucket } from '@aws-cdk/aws-s3';
Expand Down Expand Up @@ -105,7 +106,7 @@ describe('domains', () => {
'DomainName': 'default.example.com',
'EndpointConfiguration': { 'Types': ['REGIONAL'] },
'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' },
'SecurityPolicy': 'TLS_1_2',
'SecurityPolicy': ABSENT,
});
});

Expand Down Expand Up @@ -331,8 +332,6 @@ describe('domains', () => {
'Ref': 'apiDeploymentStageprod896C8101',
},
});


});

test('"addBasePathMapping" can be used to add base path mapping to the domain with specific stage', () => {
Expand Down

0 comments on commit dc18d74

Please sign in to comment.