@openhi/constructs 0.0.123 → 0.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +11 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +11 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +13 -13
package/lib/index.mjs
CHANGED
|
@@ -1546,6 +1546,14 @@ import { Bucket as Bucket2 } from "aws-cdk-lib/aws-s3";
|
|
|
1546
1546
|
import { Construct as Construct9 } from "constructs";
|
|
1547
1547
|
var STATIC_HOSTING_SERVICE_TYPE = "website";
|
|
1548
1548
|
var _StaticHosting = class _StaticHosting extends Construct9 {
|
|
1549
|
+
/**
|
|
1550
|
+
* Returns true when `domainName` begins with a wildcard label (`*.`),
|
|
1551
|
+
* indicating it is an alt-name on the CloudFront cert but cannot be
|
|
1552
|
+
* created as a Route53 ARecord.
|
|
1553
|
+
*/
|
|
1554
|
+
static isWildcardDomain(domainName) {
|
|
1555
|
+
return domainName.startsWith("*.");
|
|
1556
|
+
}
|
|
1549
1557
|
constructor(scope, id, props = {}) {
|
|
1550
1558
|
super(scope, id);
|
|
1551
1559
|
const stack = OpenHiService.of(scope);
|
|
@@ -1632,6 +1640,9 @@ var _StaticHosting = class _StaticHosting extends Construct9 {
|
|
|
1632
1640
|
});
|
|
1633
1641
|
if (hasCustomDomain) {
|
|
1634
1642
|
props.domainNames.forEach((domainName, index) => {
|
|
1643
|
+
if (_StaticHosting.isWildcardDomain(domainName)) {
|
|
1644
|
+
return;
|
|
1645
|
+
}
|
|
1635
1646
|
new ARecord(this, `dns-record-${index}`, {
|
|
1636
1647
|
zone: props.hostedZone,
|
|
1637
1648
|
recordName: domainName,
|