Download the PHP package csun-metalab/laravel-proxypass without Composer

On this page you can find all versions of the php package csun-metalab/laravel-proxypass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-proxypass

Laravel Proxy Pass

Latest Stable Version Total Downloads License

Composer package for Laravel that resolves the correct absolute URLs when behind a proxy.

This package is built for version 5.0 of Laravel and above. It modifies the functionality of the url(), asset(), and other helper methods.

To install from Composer, use the following command:

Installation

First, add the following lines to your .env file to leverage the proxy attributes:

You may also add the following optional lines to your .env file to leverage the ability to FORCE the URL and schema without having to pass through a load balancer or proxy:

Next, add the service provider to your providers array in Laravel as follows:

Finally, run the following Artisan command to publish the configuration:

Environment Variables

The two environment variables you added to your .env file are the following:

PROXY_ACTIVE

Set this to true to enable the proxying functionality or false to disable it.

PROXY_PATH_HEADER

This is the PHP-interpreted value of the request header sent from your proxy. The default is HTTP_X_FORWARDED_PATH (the computed value of X-Forwarded-Path)

Trusted Proxies

This package also has the ability to allow only certain proxy servers to modify the necessary values in order to set the proper absolute URL.

By default, all proxy servers are allowed to modify the values; if, however, the following value is set in your .env file then you can create a whitelist of proxies:

TRUSTED_PROXIES

This is a comma-delimited list of hostnames/IP addresses that are allowed to perform proxying functions.

The above example would allow the following three proxy servers to provide proxying functionality:

Usage Example

Let's say you have an application hosted at http://laravel.example.com but that is not the location you want to show to the world. Instead, you want to show a URL of http://www.example.com/laravel so you place your Laravel application behind a proxy.

However, you notice that while the front page loads properly, none of the URLs you have written with the url(), asset(), or other helpers work with that URL and instead continue writing http://laravel.example.com as their base path.

You can configure your proxy to add a request header along with your ProxyPass and ProxyPassReverse directives in Apache (ensure you have mod_headers enabled and mod_proxy enabled as well):

Now all of your URLs using the url(), asset(), and other helpers will be written correctly!


All versions of laravel-proxypass with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package csun-metalab/laravel-proxypass contains the following files

Loading the files please wait ....