@springernature/backend-proxy
Advanced tools
Comparing version 1.2.0 to 1.3.0
# History | ||
## 1.3.0 | ||
_02/02/20_ | ||
- Adds support for using JS mocks that use a function that accepts the `express` request object ([joeyciechanowicz](https://github.com/joeyciechanowicz)) | ||
## 1.2.0 | ||
@@ -11,3 +16,3 @@ _27/01/20_ | ||
- Bump handlebars version to fix critical vulnrability ([joeyciechanowicz](https://github.com/joeyciechanowicz)) | ||
- Bump handlebars version to fix critical vulnerability ([joeyciechanowicz](https://github.com/joeyciechanowicz)) | ||
@@ -14,0 +19,0 @@ ## 1.1.2 |
{ | ||
"name": "@springernature/backend-proxy", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Proxies frontend requests to a backend and can render the result", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,3 +46,10 @@ const path = require('path'); | ||
request[options.key] = require(resolvedFile); | ||
const mockResponse = require(resolvedFile); | ||
if (typeof mockResponse === 'function') { | ||
request[options.key] = mockResponse(request); | ||
} else { | ||
request[options.key] = mockResponse; | ||
} | ||
next(); | ||
@@ -49,0 +56,0 @@ } catch (error) { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16217
185
1