Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janl/cors-proxy
über-simple node.js-Proxy to enable CORS request for any website.
https://github.com/janl/cors-proxy
Last synced: 3 months ago
JSON representation
über-simple node.js-Proxy to enable CORS request for any website.
- Host: GitHub
- URL: https://github.com/janl/cors-proxy
- Owner: janl
- Fork: true (gr2m/CORS-Proxy)
- Created: 2012-11-05T12:05:20.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-29T13:59:38.000Z (almost 12 years ago)
- Last Synced: 2024-04-07T01:27:33.081Z (9 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 234 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
As a standalone tool:
$ npm install -g corsproxy
As a dependency:
$ npm install corsproxy
## Running
Standalone:
$ corsproxy
CORS Proxy started on localhost:9292Standalone with custom host/port:
$ corsproxy 0.0.0.0 1234
CORS Proxy started on 0.0.0.0:1234As a dependency:
var cors_proxy = require("corsproxy");
var http_proxy = require("http-proxy");
http_proxy.createServer(cors_proxy).listen(1234);With custom target:
var cors_proxy = require("corsproxy");
var http_proxy = require("http-proxy");
cors_proxy.options = {
target: {
host:"0.0.0.0",
port:5984
}
};
http_proxy.createServer(cors_proxy).listen(1234);## Usage
The cors proxy will start at http://localhost:9292. To access another domain, use the domain name (including port) as the first folder, e.g.
http://localhost:9292/localhost:3000/sign_in
http://localhost:9292/my.domain.com/path/to/resource
etc etc