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

@sebastiandg7/local-cors-proxy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sebastiandg7/local-cors-proxy - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

41

bin/lcp.js
#!/usr/bin/env node
var lcp = require('../lib/index.js');
var commandLineArgs = require('command-line-args');
var lcp = require("../lib/index.js");
var commandLineArgs = require("command-line-args");
var optionDefinitions = [
{ name: 'port', alias: 'p', type: Number, defaultValue: 8010 },
{ name: "port", alias: "p", type: Number, defaultValue: 8010 },
{
name: 'proxyPartial',
name: "proxyPartial",
type: String,
defaultValue: '/proxy'
defaultValue: "/proxy",
},
{ name: 'proxyUrl', type: String },
{ name: 'credentials', type: Boolean, defaultValue: false },
{ name: 'origin', type: String, defaultValue: '*' },
{ name: 'removeRequestOrigin', type: Boolean, defaultValue: false }
{ name: "proxyUrl", type: String },
{ name: "credentials", type: Boolean, defaultValue: false },
{ name: "origin", type: String, defaultValue: "*" },
{ name: "removeRequestOrigin", type: Boolean, defaultValue: false },
];

@@ -21,8 +21,25 @@

var options = commandLineArgs(optionDefinitions);
if (!options.proxyUrl) {
throw new Error('--proxyUrl is required');
const {
port,
proxyUrl,
proxyPartial,
credentials,
origin,
removeRequestOrigin,
} = options;
if (!proxyUrl) {
throw new Error("--proxyUrl is required");
}
lcp.startProxy(options.port, options.proxyUrl, options.proxyPartial, options.credentials, options.origin);
lcp.startProxy(
port,
proxyUrl,
proxyPartial,
credentials,
origin,
removeRequestOrigin
);
} catch (error) {
console.error(error);
}
{
"name": "@sebastiandg7/local-cors-proxy",
"version": "1.1.0",
"version": "1.1.1",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "scripts": {

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