sls-helper-plugin-janis
Advanced tools
Comparing version 2.9.1 to 2.9.2
@@ -9,2 +9,6 @@ # Changelog | ||
## [2.9.2] - 2020-03-26 | ||
### Fixed | ||
- Escaped error response message to avoid breaking JSON structure | ||
## [2.9.1] - 2020-03-26 | ||
@@ -11,0 +15,0 @@ ### Fixed |
@@ -11,3 +11,3 @@ 'use strict'; | ||
}, | ||
template: '#set($headers = $input.path("$.headers"))\n#foreach($key in $headers.keySet())\n#set($k = $util.escapeJavaScript($key))\n#set($v = $headers.get($key))\n$context.responseOverride.header.put("$k", "$v")\n#end\n#set($origin = $input.params("Origin"))\n#if(!$origin || $origin == "")#set($origin = $input.params("origin"))#end\n#if($origin && $origin != "")\n#set($context.responseOverride.header.Access-Control-Allow-Origin = $origin)\n#end\n#set($errorMessage = $input.path("$.errorMessage"))\n#if($errorMessage && $errorMessage != "")\n#set($errorMessageObj = $util.parseJson($errorMessage))\n{"message":"$errorMessageObj.body.message"}\n#else\n#set($body = $input.json("$.body"))\n#if($body && $body != "")\n$util.parseJson($body).replaceAll("\\`", "")\n#end\n#end' | ||
template: '#set($headers = $input.path("$.headers"))\n#foreach($key in $headers.keySet())\n#set($k = $util.escapeJavaScript($key))\n#set($v = $headers.get($key))\n$context.responseOverride.header.put("$k", "$v")\n#end\n#set($origin = $input.params("Origin"))\n#if(!$origin || $origin == "")#set($origin = $input.params("origin"))#end\n#if($origin && $origin != "")\n#set($context.responseOverride.header.Access-Control-Allow-Origin = $origin)\n#end\n#set($errorMessage = $input.path("$.errorMessage"))\n#if($errorMessage && $errorMessage != "")\n#set($errorMessageObj = $util.parseJson($errorMessage))\n{"message":"$util.escapeJavaScript($errorMessageObj.body.message)"}\n#else\n#set($body = $input.json("$.body"))\n#if($body && $body != "")\n$util.parseJson($body)\n#end\n#end' | ||
}; |
{ | ||
"name": "sls-helper-plugin-janis", | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"description": "A Serverless Helper plugin to add custom helpers for JANIS Commerce", | ||
@@ -5,0 +5,0 @@ "main": "lib/plugin.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38079