PHPackages                             mamyraoby/laravel-proxy - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mamyraoby/laravel-proxy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mamyraoby/laravel-proxy
=======================

Better support reverse proxy Laravel deployement

0.0.2(1y ago)352[1 issues](https://github.com/mamyraoby/laravel-proxy/issues)PHP

Since Jun 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mamyraoby/laravel-proxy)[ Packagist](https://packagist.org/packages/mamyraoby/laravel-proxy)[ RSS](/packages/mamyraoby-laravel-proxy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Laravel Proxy Package
=====================

[](#laravel-proxy-package)

What are the use of this package?
---------------------------------

[](#what-are-the-use-of-this-package)

- **Automated Configuration:** The package automates the configuration process for Laravel apps deployed behind reverse proxy web servers. This is beneficial because it eliminates the need for repetitive manual configuration each time the app is deployed, saving time and reducing the potential for human error.
- **Asset Handling:** One of the key issues it addresses is the incorrect serving of built and dynamic assets. Reverse proxies can sometimes cause issues with how assets are delivered to the client, and this package ensures that assets are served correctly without additional manual adjustments.
- **Quick Setup:** By using this package, developers can quickly set up their Laravel application for deployment behind a reverse proxy, making the deployment process more efficient.

Installation
------------

[](#installation)

Add `mamyraoby/laravel-proxy` as depenceny of your project, by running the following command:

```
composer require mamyraoby/laravel-proxy
```

Then register this middleware into your application:

### Laravel 11 and above

[](#laravel-11-and-above)

Open the `bootstrap/app.php` and add the following line inside the middlewares registration section:

```
$middleware->append([
    \MamyRaoby\LaravelProxy\Middleware\ProxyMiddleware::class,
]);
```

### Laravel ancient version

[](#laravel-ancient-version)

Open the `app/Http/Kernel.php` and update the `middleware` attrubutes value by adding this line:

```
protected $middleware = [
    \MamyRaoby\LaravelProxy\Middleware\ProxyMiddleware::class,
];
```

You may set up these **env variables** into your `.env` file:

- `PROXY_SCHEME`:

    Accepted value: ***http*** or ***https*** . Default to ***http*** if not set.
- `PROXY_URL`:

    Accepted value: The **base URL** of the reverse proxy server. Example: **, make sure to include the port if you run from port different form 80 or 443. Default to `APP_URL` env value if not set.
- `PROXY_TRUSTED_IPS`:

    A set of trusted proxies IP address, separated by comma.

    Example: `PROXY_TRUSTED_IPS=172.1.0.0,192.168.1.1`

    Default to `*` if not set, which means always trust everything.

    Unset this variable if your server has dynamic IP address or in case you don't know exactly the IP addresses for your server.

You should be good now, but if you need any further configuration or extension, you may publish the configuration file from the vendor, by running the following command:

```
php artisan vendor:publish mamyraoby-laravel-proxy-config
```

... and feel free to update your configuration.

Contribution
------------

[](#contribution)

If you want to contribute or signal bugs, don't hesitate to open an issue or make a pull request, I also open to discuss, so email me at [](mailto:mamyraoby@outlook.com).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance25

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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 ~3 days

Total

3

Last Release

689d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e9178a176c5ff0cb944bd65e7956632f1349a0b2e9f9bd96e8e1d9be77f4660?d=identicon)[mamyraoby](/maintainers/mamyraoby)

---

Top Contributors

[![mamyraoby](https://avatars.githubusercontent.com/u/81308480?v=4)](https://github.com/mamyraoby "mamyraoby (7 commits)")

### Embed Badge

![Health badge](/badges/mamyraoby-laravel-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/mamyraoby-laravel-proxy/health.svg)](https://phpackages.com/packages/mamyraoby-laravel-proxy)
```

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)

PHPackages © 2026

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