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

@springernature/backend-proxy

Package Overview
Dependencies
Maintainers
12
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@springernature/backend-proxy - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

HISTORY.md
# History
## 2.0.1
_05/06/20_
- Returns client error status codes from the backend and only raises errors if the backend responds with `500 - 599`. ([springerBuck](https://github.com/springerBuck))
## 2.0.0

@@ -4,0 +9,0 @@ _06/05/20_

2

package.json
{
"name": "@springernature/backend-proxy",
"version": "2.0.0",
"version": "2.0.1",
"description": "Proxies frontend requests to a backend and can render the result",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,3 +21,3 @@ # backend-proxy

The `backend-proxy` middleware will take all incoming HTTP requests and forward them to a backend service. The backend response will then be stored on the original HTTP request to be used by your application, or automatically rendered using `render-backend-response`.
The `backend-proxy` middleware will take all incoming HTTP requests and forward them to a backend service. The backend response will then be stored on the original HTTP request to be used by your application, or automatically rendered using `render-backend-response`. The status code from the backend will also be returned, this includes client errors (40X). However, server errors (50X) will result in an error being raised.

@@ -24,0 +24,0 @@ ```js

@@ -54,3 +54,3 @@ const http = require('http');

// Should we intercept the error and raise it as an express error
if (backendResponse.statusCode >= 400 && backendResponse.statusCode <= 599) {
if (backendResponse.statusCode >= 500 && backendResponse.statusCode <= 599) {
return next({statusCode: backendResponse.statusCode});

@@ -57,0 +57,0 @@ }

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