Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregorypierce/5d22dbe1a8026d05afbabd94479a94c5 to your computer and use it in GitHub Desktop.
Save gregorypierce/5d22dbe1a8026d05afbabd94479a94c5 to your computer and use it in GitHub Desktop.
// add the custom domain for this api. Must be listed in the certificate
//
const domain = new apigw.DomainName( this, "api_domain_name", {
domainName: props.subdomainPrefix + "." + props.domainName,
securityPolicy: apigw.SecurityPolicy.TLS_1_2,
certificate: props.certificate,
endpointType: apigw.EndpointType.EDGE
});
var basePath = props.basePath != undefined? props.basePath : props.name;
basePath = basePath.toLowerCase().replace(/[^a-zA-Z0-9]/g, '');
domain.addBasePathMapping( this.api, { basePath: basePath });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment