http://cors-proxy.htmldriven.com/?url=

About

CORS proxy is a free service for developers who need to bypass same-origin policy related to performing standard AJAX requests to 3rd party services.

You can simply use this website as quickest way to finally start doing some cross-domain requests and even you can run this service on your own webserver. If you prefer running the service on your own, follow the instructions in Setup section.

You can customize the service parameters to fit your own needs (including this front-end page template).


How to use

The CORS proxy service expects you provide the URL of 3rd party service/page in url HTTP GET parameter by default. A final cross-domain request URL via the CORS proxy service can be handled, looks something like this:

http://cors-proxy.htmldriven.com/?url=http://www.htmldriven.com/sample.json

Try the CORS proxy now

You can test the CORS proxy service response using the form above.


Setup

Read the following section if you want to run the CORS proxy on your own webserver.

Requirements

Please, check the composer.json file or packagist.org to see the current list of requirements in terms of packages which are required by composer. Except for PHP version >=5.6 with CURL extension being installed, there are no more odd requirements

Installation

The best way to install the CORS proxy is using the composer. You can do that using the following command:

composer create-project htmldriven/cors-proxy my-cors-proxy

* Note that my-cors-proxy in the command above is the name of target directory for newly created CORS proxy project, so this name is totally up to you.

Configuration

If you need, you can customize the CORS proxy by creating custom config.ini file. This file must be located at app/config directory. There's already config.sample.ini file, which you can just copy and edit some parts of it to match your needs.

There are several config items which you can change. The following list shows all supported options:


License

CORS proxy is totally free as it's available and being distributed under The MIT License.