Socket
Socket
Sign inDemoInstall

@serverless/domain

Package Overview
Dependencies
80
Maintainers
5
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

2

package.json
{
"name": "@serverless/domain",
"version": "3.0.0",
"version": "3.0.1",
"main": "./serverless.js",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -149,3 +149,3 @@ const { Component } = require('@serverless/core')

)
await addDomainToCloudfrontDistribution(clients.cf, subdomain)
await addDomainToCloudfrontDistribution(clients.cf, subdomain, certificate.CertificateArn)

@@ -152,0 +152,0 @@ this.context.debug(`Configuring DNS for distribution "${subdomain.url}".`)

@@ -794,3 +794,3 @@ const aws = require('aws-sdk')

const addDomainToCloudfrontDistribution = async (cf, subdomain, distributionUrl) => {
const addDomainToCloudfrontDistribution = async (cf, subdomain, certificateArn) => {
// Update logic is a bit weird...

@@ -800,3 +800,3 @@ // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudFront.html#updateDistribution-property

// 1. we gotta get the config first...
const params = await cf.getDistributionConfig({ Id: subdomain.id }).promise()
const params = await cf.getDistributionConfig({ Id: subdomain.distributionId }).promise()

@@ -810,3 +810,3 @@ // 2. then add this property

// 4. then set this property
params.Id = subdomain.id
params.Id = subdomain.distributionId

@@ -819,2 +819,10 @@ // 5. then make our changes

params.DistributionConfig.ViewerCertificate = {
ACMCertificateArn: certificateArn,
SSLSupportMethod: 'sni-only',
MinimumProtocolVersion: 'TLSv1.1_2016',
Certificate: certificateArn,
CertificateSource: 'acm'
}
// 6. then finally update!

@@ -821,0 +829,0 @@ const res = await cf.updateDistribution(params).promise()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc