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.0 to 1.3.1

6

HISTORY.md
# History
## 1.3.1
_18/02/20_
- Specifies the host header in the correct order. ([joeyciechanowicz](https://github.com/joeyciechanowicz))
- Removes backend domain from location on a 30x response ([springerBuck](https://github.com/springerBuck))
## 1.3.0

@@ -4,0 +10,0 @@ _02/02/20_

4

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

@@ -14,3 +14,3 @@ "main": "index.js",

"test": "jest --coverage",
"test:watch": "jest --watch --testPathIgnorePatterns integration"
"test:watch": "jest --watch"
},

@@ -17,0 +17,0 @@ "engines": {

@@ -56,4 +56,4 @@ const http = require('http');

if (options.changeHost) {
request.headers['X-Orig-Host'] = request.headers.host;
request.headers.host = backendHttpOptions.host;
request.headers['X-Orig-Host'] = request.hostname;
}

@@ -83,2 +83,10 @@

response.statusCode = backendResponse.statusCode;
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;
}
response.header(backendResponse.headers);

@@ -85,0 +93,0 @@ backendResponse.pipe(response);

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