Skip to content

Commit

Permalink
fix: Allow alternate domain names in the distribution (#101)
Browse files Browse the repository at this point in the history
* chore: allow alternate domains

* chore: fix build
  • Loading branch information
keenankaufman authored Apr 21, 2023
1 parent c49774c commit 3680304
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NextjsDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,10 @@ export class NextjsDistribution extends Construct {
const customDomain =
typeof this.props.customDomain === 'string' ? this.props.customDomain : this.props.customDomain?.domainName;

return customDomain ? [customDomain] : [];
const alternateNames =
typeof this.props.customDomain === 'string' ? [] : this.props.customDomain?.alternateNames || [];

return customDomain ? [customDomain, ...alternateNames] : [];
}

/**
Expand Down

0 comments on commit 3680304

Please sign in to comment.