Skip to content
/ proxy Public

It's a simple local proxy server to avoid CORS issues while developing locally

License

Notifications You must be signed in to change notification settings

jtmg-os/proxy

Repository files navigation

PHP based URI proxy

###Status Codacy Badge SensioLabsInsight Build Status

What

It's a simple local proxy server to avoid CORS issues while developing locally, should work out of the box ;)

Why

for all those who are fed up with CORS, when they develop thier project and dont have influence of the Origin flag this is their salvation.

How

It's React based local server that listens on a specified port and proxies out all incoming requests to configured endpoint and outputs remote response.

Installing via Composer

# Install Composer
git clone https://github.com/jtmg-os/proxy.git
cd proxy

curl -sS https://getcomposer.org/installer | php

php composer.phar install
php server.php

After installing, you need to configure it a bit, its messy at this point but this is first draft ;-)

destinationUrl => 'http://www.google.com' //clearly your destination url
corsOrigin => '*' // CORS overwrite, feel free to leave it open like this or set to your specific or even mess around
port => '1337' // this is where you can overwrite the default port, go nuts ;)

Known Issues

  1. Even tough verbs are being mapped across for full CRUD, body is not passed over as i never needed it (feel free to contribute if you need this feature)

About

It's a simple local proxy server to avoid CORS issues while developing locally

Resources

License

Stars

Watchers

Forks

Packages

No packages published