Coder Social home page Coder Social logo

corsica's Introduction

CORSica

corsica old flag

A very simple HTTP CORS proxy written in PHP using cURL

How it works?

You provide $domain of the target server. Every HTTP header is copied except Redirect, Origin and Host where Origin and Host become the value of $domain. Then proxy just sends the edited request to the target server using cURL. When the response is returned the response from proxy to client is extended with the target server's headers. That's about it. You just host this corsica.php file in your local setup or on your server, and you are all set. Mind the .htaccess that forwards all of the requests to the requests to the corsica.phpproxy, if you need it...

The proxy is not finished yet!!!

Currently the proxy is intended for RESTful API endpoints, this has to be changed for the proxy to be adaptable to any situation. Also detecting the file name of the script shouldn't be hardcoded to public_html. The code is very simple, you'll figure it out before I even make the final improvements and adapt it to your needs.

Meilleures salutations,

Stamat

April 2016. Montpellier, France

corsica's People

Contributors

stamat avatar

Watchers

Shawn Rider avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.