@maestro-js/aws-cdk-recipes 1.0.0-alpha.27 → 1.0.0-alpha.28
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/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4250,7 +4250,12 @@ function resolveSenderType(sender) {
|
|
|
4250
4250
|
}
|
|
4251
4251
|
function resolveIdentity(senderType, sender, hostedZone) {
|
|
4252
4252
|
if (senderType === "email") return ses.Identity.email(sender);
|
|
4253
|
-
if (hostedZone)
|
|
4253
|
+
if (hostedZone) {
|
|
4254
|
+
if (sender !== hostedZone.zoneName && !sender.endsWith(`.${hostedZone.zoneName}`)) {
|
|
4255
|
+
throw new Error(`sender "${sender}" is not within hosted zone "${hostedZone.zoneName}"`);
|
|
4256
|
+
}
|
|
4257
|
+
return { value: sender, hostedZone };
|
|
4258
|
+
}
|
|
4254
4259
|
return ses.Identity.domain(sender);
|
|
4255
4260
|
}
|
|
4256
4261
|
function resolveEventDestination(event) {
|