Convenient Node.js app for circumventing CORS issues when developing on localhost.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
README.md
package.json

README.md

Relayed

Travis CI

 

NPM Version

Convenient Shell/Node script for circumventing CORS issues when developing on localhost.

Via npm: npm install relayed -g

May require sudo access.

Functionality

When you're developing on localhost, you may not want to go through configuring CORS when making AJAX requests. Instead Relayed relays all requests to the foreign server via localhost.

  • All parameters are passed along;
  • Correct HTTP verbs are maintained;
  • HTTPS/HTTP protocols supported;

Getting Started

The recommended method is running it via the Shell script.

relayed -h npm.org -p 80

Open localhost:8910 in your browser and npm.org will be returned. Please remember that Relayed is only for development.

Options

  • -h <host> – Hostname to relay to (required);
  • -p <port> – Port number of the host (defaults to 80);
  • -s – Use HTTPS for the transport protocol;
  • -o – Open localhost:8910 in your browser;