cors-proxy-local
v0.1.2
Published
Local development CORS proxy with an lcp-compatible CLI.
Readme
dev-cors-proxy
Maintained local development CORS proxy with an lcp-compatible CLI. This project is a modernized clone of garmeeh/local-cors-proxy, rebuilt so the dependency surface stays small and easy to update.
Status
- Compatible CLI flags:
--proxyUrl,--proxyPartial,--port,--credentials,--origin - Package manager:
pnpm - Runtime baseline: Node.js 20+
- Publish target: npm public package
Install
pnpm installGlobal usage after publish:
pnpm add -g dev-cors-proxy
lcp --proxyUrl https://www.yourdomain.ieLocal usage during development:
pnpm start -- --proxyUrl https://www.yourdomain.ieExample
API endpoint with CORS issues:
https://www.yourdomain.ie/movies/listStart the proxy:
lcp --proxyUrl https://www.yourdomain.ieCall the proxied endpoint from your client:
http://127.0.0.1:8010/proxy/movies/listOptions
| Option | Example | Default |
| --- | --- | --- |
| --proxyUrl | https://www.google.ie | required |
| --proxyPartial | foo | proxy |
| --port | 8010 | 8010 |
| --credentials | no value required | false |
| --origin | http://localhost:4200 | * |
Development
pnpm testBefore the first publish, update these package.json fields to your real values:
authorrepositorybugshomepage
Review the tarball contents before publishing:
npm pack --dry-runManual publish:
npm publish --access publicRelease automation
GitHub Actions workflow: .github/workflows/publish.yml
- Trigger a publish by pushing a version tag such as
v0.1.0 - The workflow verifies the tag matches
package.json - Publishing uses npm trusted publishing with provenance, not a long-lived npm token
