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

cors-backdoor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cors-backdoor

A simple proxy server built using express to bypass cors restrictions during development

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
845
decreased by-15.84%
Maintainers
1
Weekly downloads
 
Created
Source

cors-backdoor

A CORS-friendly local proxy to access cross origin resources

Version Downloads License Known Vulnerabilities


A temporary workaround for common CORS errors like:


Access to fetch at 'http://api.example.com/posts' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Access to fetch at 'http://api.example.com/posts' from origin 'http://localhost:8082' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

Installation

Install as a global module (recommended)

npm install -g cors-backdoor

Install as a dev dependency

npm install -D cors-backdoor

Quick Start

cors-backdoor --target http://api.example.com

This will start a local proxy running on the port 1234 for the target http://api.example.com. The client will have to be reconfigured to make requests which looked like http://api.example.com/posts to http://localhost:1234/posts instead

Documentation

CLI API, Advanced configuration and more on the docs page https://drishtilabs.github.io/cors-backdoor

Keywords

FAQs

Package last updated on 21 Aug 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