Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including local-cors-proxy with all npm packages installed. Try it out:

var localCorsProxy = require("local-cors-proxy")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

local-cors-proxy v1.1.0

Local CORS Proxy

Simple proxy to bypass CORS issues. This was built as a local dev only solution to enable prototyping against existing APIs without having to worry about CORS.

This module was built to solve the issue of getting this error:

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disable

Getting Started

npm install -g local-cors-proxy

Simple Example

API endpoint that we want to request that has CORS issues:

Start Proxy:

lcp --proxyUrl

Then in your client code, new API endpoint:


End result will be a request to without the CORS issues!

Alternatively you can install the package locally and add a script to your project:

 "scripts": {
   "proxy": "lcp --proxyUrl"


--credentials(no value needed)false
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free