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

@springernature/backend-proxy

Package Overview
Dependencies
Maintainers
11
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 1.3.1 to 1.3.2

5

HISTORY.md
# History
## 1.3.2
_26/02/20_
- Fixes `location` header rewriting to only rewrite the host ([springerBuck](https://github.com/springerBuck))
## 1.3.1

@@ -4,0 +9,0 @@ _18/02/20_

2

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

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

@@ -83,7 +83,7 @@ const http = require('http');

if (backendResponse.statusCode >= 300 && backendResponse.statusCode <= 399 &&
backendResponse.headers.location &&
backendResponse.headers.location.startsWith(options.backend)) {
let locationUrl = new url.URL(backendResponse.headers.location);
backendResponse.headers.location = locationUrl.pathname + locationUrl.search + locationUrl.hash;
if (backendResponse.statusCode >= 300 && backendResponse.statusCode <= 399 && backendResponse.headers.location) {
if (backendResponse.headers.location.includes(backendHttpOptions.host)) {
const locationUrl = new url.URL(backendResponse.headers.location);
backendResponse.headers.location = locationUrl.pathname + locationUrl.search + locationUrl.hash;
}
}

@@ -90,0 +90,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