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

cdproxy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdproxy - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

6

index.js

@@ -38,3 +38,7 @@

console.log('index- backendUrl: ', backendUrl);
if (!parsedUrl.hostname) {
//see if the url was encoded twice.
backendUrl = decodeURIComponent(backendUrl);
parsedUrl = url.parse(backendUrl);
}

@@ -41,0 +45,0 @@ //adjust the req object.

2

package.json

@@ -5,3 +5,3 @@ {

"main" : "index.js",
"version" : "0.0.2",
"version" : "0.0.3",
"dependencies" : {

@@ -8,0 +8,0 @@ "http-proxy" : "*"

@@ -57,2 +57,13 @@ var assert = require('assert'),

it('should proxy double encoded urls', function ( done ) {
var url = encodeURIComponent('http://localhost:9000');
request
.get({
uri: 'http://localhost:8000/proxy/' + url
}, function ( err, res, body ) {
assert.equal(body, "response from remote");
done();
});
});
it('should ignore urls outside /proxy/', function ( done ) {

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