Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sls-helper-plugin-janis

Package Overview
Dependencies
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sls-helper-plugin-janis - npm Package Compare versions

Comparing version 2.4.1 to 2.5.0

7

CHANGELOG.md

@@ -9,2 +9,9 @@ # Changelog

## [2.5.0] - 2020-02-21
### Added
- API Gateway response `AUTHORIZER_CONFIGURATION_ERROR`
### Fixed
- API Gateway responses are not overriden any more
## [2.4.1] - 2020-02-20

@@ -11,0 +18,0 @@ ### Fixed

149

lib/service/base.js

@@ -147,79 +147,94 @@ 'use strict';

],
resources: [
{
Resources: {
resources: {
Resources: {
unauthorizedResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString}'
},
ResponseType: 'UNAUTHORIZED',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '401'
}
},
UnauthorizedResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString}'
},
ResponseType: 'UNAUTHORIZED',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '401'
}
},
badRequestBodyResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'BAD_REQUEST_BODY',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '400'
}
},
BadRequestBodyResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'BAD_REQUEST_BODY',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '400'
}
},
badRequestParameters: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'BAD_REQUEST_PARAMETERS',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '400'
}
},
BadRequestParameters: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'BAD_REQUEST_PARAMETERS',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '400'
}
},
accessDeniedResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'ACCESS_DENIED',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '403'
}
AccessDeniedResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'ACCESS_DENIED',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '403'
}
},
AuthorizerConfigurationErrorResponse: {
Type: 'AWS::ApiGateway::GatewayResponse',
Properties: {
ResponseParameters: {
'gatewayresponse.header.Access-Control-Allow-Origin': 'method.request.header.Origin'
},
ResponseTemplates: {
'application/json': '{"message":$context.error.messageString,"validationError":"$context.error.validationErrorString"}'
},
ResponseType: 'AUTHORIZER_CONFIGURATION_ERROR',
RestApiId: {
Ref: 'ApiGatewayRestApi'
},
StatusCode: '500'
}
}
}
],
},
...serviceConfig
};
};
{
"name": "sls-helper-plugin-janis",
"version": "2.4.1",
"version": "2.5.0",
"description": "A Serverless Helper plugin to add custom helpers for JANIS Commerce",

@@ -5,0 +5,0 @@ "main": "lib/plugin.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc