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

cors-http-proxy

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

cors-http-proxy

This is a simple reverse proxy which can be used for development to access server responses where CORS is not enabled for a specific reason.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
decreased by-5.13%
Maintainers
1
Weekly downloads
 
Created
Source

CORS http proxy

This is a simple reverse proxy which can be used for development to access server responses where CORS is not enabled for a specific reason.

In addition to allowing all CORS preflight requests, it will also expose access control headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers) based on some random tokens like "token", "secret", "csrf"

Usage

Install the package as a dev dependency in your application

npm install cors-http-proxy --save-dev

Start the proxy by setting a desired target and port

cors-http-proxy -t https://google.ro -p 8082

Example with an angular application with npm scripts

{
  "scripts": {
    "start:dev": "cors-http-proxy -t https://your-dev-server.com -p 8082 | ng serve"
  }
}

Keywords

FAQs

Package last updated on 10 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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