Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
local-cors-proxy-encoded
Advanced tools
This is a fork that modifies the original [local-cors-proxy](https://github.com/garmeeh/local-cors-proxy) to accept a full URL via encoded URI.
This is a fork that modifies the original local-cors-proxy to accept a full URL via encoded URI.
For example, instead of using
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
Then in your client code, new API endpoint using encodeURIComponent:
http://localhost:8010/https%3A%2F%2Fwww.yourdomain.ie%2Fmovies%2Flist
End result will be a request to https://www.yourdomain.ie/movies/list
without the CORS issues!
Install Locally Alternatively you can install the package locally and add a script to your project:
"scripts": {
"proxy": "lcp"
}
Option | Example | Default |
---|---|---|
--port | 8010 | 8010 |
--credentials | (no value needed) | false |
--origin | http://localhost:4200 | * |
FAQs
This is a fork that modifies the original [local-cors-proxy](https://github.com/garmeeh/local-cors-proxy) to accept a full URL via encoded URI.
The npm package local-cors-proxy-encoded receives a total of 0 weekly downloads. As such, local-cors-proxy-encoded popularity was classified as not popular.
We found that local-cors-proxy-encoded 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.