
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
local-cors-proxy
Advanced tools
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.
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
npm install -g local-cors-proxy
Simple Example
API endpoint that we want to request that has CORS issues:
https://www.yourdomain.ie/movies/list
Start Proxy:
lcp --proxyUrl https://www.yourdomain.ie
Then in your client code, new API endpoint:
http://localhost:8010/proxy/movies/list
End result will be a request to https://www.yourdomain.ie/movies/list
without the CORS issues!
Alternatively you can install the package locally and add a script to your project:
"scripts": {
"proxy": "lcp --proxyUrl https://www.yourdomain.ie"
}
Option | Example | Default |
---|---|---|
--proxyUrl | https://www.google.ie | |
--proxyPartial | foo | proxy |
--port | 8010 | 8010 |
--credentials | (no value needed) | false |
--origin | http://localhost:4200 | * |
FAQs
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.
The npm package local-cors-proxy receives a total of 20,234 weekly downloads. As such, local-cors-proxy popularity was classified as popular.
We found that local-cors-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.