outworx-proxy
v1.0.3
Published
Local proxy for testing localhost APIs from Outworx Docs. Bypasses CORS restrictions so you can use the Try It playground with your local dev server.
Maintainers
Readme
outworx-proxy
A lightweight local proxy for testing localhost APIs from Outworx Docs. Bypasses CORS restrictions so the Try It playground can reach your local dev server.
Quick Start
npx outworx-proxyThat's it. The Outworx Docs playground will automatically detect the proxy and route localhost requests through it.
Why?
When your API docs are hosted on docs.outworx.io and your API runs on localhost:3000, the browser blocks requests due to CORS. This proxy runs on your machine and forwards requests from the docs UI to your local API.
Browser (docs.outworx.io)
│
├── Remote API → /api/proxy (server-side, no setup needed)
│
└── Localhost API → outworx-proxy (localhost:9876) → your API (localhost:3000)How It Works
- Run
npx outworx-proxyin your terminal - Open your API docs on Outworx Docs
- Set a localhost base URL (e.g.
http://localhost:3000) - The playground detects the proxy automatically (green "Local proxy connected" indicator)
- Click Send Request — the proxy forwards it to your local API and returns the response
Options
Usage: outworx-proxy [options]
Options:
-p, --port <number> Port to listen on (default: 9876)
--allow-origin <url> Restrict CORS to a specific origin (default: *)
--verbose Show detailed request/response logs
-h, --help Show this help message
-v, --version Show version numberSecurity
- Only forwards requests to loopback addresses (
localhost,127.0.0.1,::1) - Will not proxy to remote/public APIs — use the built-in server-side proxy for that
- Supports self-signed HTTPS certificates on localhost
License
MIT
