PHPackages                             arthurh/rest-proxifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. arthurh/rest-proxifier

ActiveLibrary[HTTP &amp; Networking](/categories/http)

arthurh/rest-proxifier
======================

proxy your rest api

1.0.5(11y ago)017MITPHP

Since Mar 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/ArthurHlt/rest-proxifier)[ Packagist](https://packagist.org/packages/arthurh/rest-proxifier)[ Docs](https://github.com/ArthurHlt/rest-proxifier)[ RSS](/packages/arthurh-rest-proxifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (6)Used By (0)

rest-proxifier
==============

[](#rest-proxifier)

The goal of this project is to proxy your rest api.

Why do this?
------------

[](#why-do-this)

First, it was initialized when I found that some rest api doesn't handle [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).

This project will reinject CORS headers for angularjs project for example.

This project will also cache response for read request.

**NOTE:** Rest-proxifier use `pathinfo` so set your web server to use it.

**NOTE2:** This project is [Cloud Foundry](http://www.cloudfoundry.org/about/index.html) Ready, so you can also use it inside Cloud Foundry to handle uaa rest api for example.

Installation
============

[](#installation)

Through Composer, obviously:

```
$ composer create-project arthurh/rest-proxifier path/
```

How to use
==========

[](#how-to-use)

You can use rest-proxifier in multiple ways:

- Proxy from cnnfig file
- Proxy from CloudFoundry Services if you use CloudFoundry
- Proxy from database entries

Theses 3 ways can be used in same time, there is no limit.

For simple use, look at `config/default.yml`:

```
proxyfy:
  - api: http://example.com
    route: /api
    #this is optionnal
    #request-header:
    #  header-key: header-value
    #response-header:
    #  header-key: header-value
    #response-content: ~
admin-ui: true #set to false to remove admin interface
admin-ui-root: /admin #path to admin ui
rewriting: false #set to true if you use rewriting to point directly on index.php
caching-time: 20 minutes #set to false to remove caching
log-request: true #set to false to stop logs user request to proxify
database: false #or uri to database, e.g: mysql://root:password@localhost/mydb or special uri for sqlite: sqlite:/path, this is optionnal
```

This file can be rewrite in `json` or in `xml` too, it uses this dependency [noodlehaus/config](https://github.com/noodlehaus/config) so follow schemas from this dependency if you don't want use yaml.

For this default config there is an example, a route is already set.

What you should do to try is to go to `http:///index.php/api` and rest-proxifier will respond the page `http://example.com` with CORS headers.

If you do `http:///index.php/api/other/verb/for/api` rest-proxifier will respond `http://example.com/other/verb/for/api`.

Admin interface
---------------

[](#admin-interface)

By default you have an interface located on `http:///index.php/admin`.

You can use it to add more proxy only on a database.

Proxies from config file can't be modify with this interface with the goal make accessible all the time theses proxies.

For Cloud Foundry user
----------------------

[](#for-cloud-foundry-user)

This part is only for people who use the Cloud Foundry PaaS.

You can create a service which contain `proxy` (use regex to find service) in his name with this json value for example:

```
[
    {
      "api": "http://example.com",
      "route": "/api"
    }
]
```

And rest-proxifier will auto-bind to this service

You can also create a database service which should contains at least one of theses values in its name (use regex to find service):

- `my` (for mysql)
- `db`
- `database`
- `oracle`
- `oci`
- `postgres`
- `pgsql`
- `maria`

And rest-proxifier will auto-bind database to this service

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

4

Last Release

4046d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9ba88d407b0fba1107b4644f27fbabe80a816da59208e2907f7d3902c8f862d?d=identicon)[ArthurHlt](/maintainers/ArthurHlt)

---

Top Contributors

[![ArthurHlt](https://avatars.githubusercontent.com/u/5410858?v=4)](https://github.com/ArthurHlt "ArthurHlt (25 commits)")

---

Tags

httphttpsapiproxyrestproxy-restproxy-rest-apiproxy-httpproxy-https

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arthurh-rest-proxifier/health.svg)

```
[![Health](https://phpackages.com/badges/arthurh-rest-proxifier/health.svg)](https://phpackages.com/packages/arthurh-rest-proxifier)
```

###  Alternatives

[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[bigcommerce/api

Enables PHP applications to communicate with the Bigcommerce API.

1501.1M8](/packages/bigcommerce-api)[aphiria/aphiria

The Aphiria framework

1427.7k2](/packages/aphiria-aphiria)[elementaryframework/water-pipe

URL routing framework and requests/responses handler for PHP

254.6k4](/packages/elementaryframework-water-pipe)[quickbooks/payments-sdk

The Official PHP SDK for QuickBooks Online Payments API

2758.2k2](/packages/quickbooks-payments-sdk)[msankhala/parsehub-php

Php wrapper classes for Parsehub REST api.

1312.4k](/packages/msankhala-parsehub-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
