Download the PHP package middlewares/www without Composer
On this page you can find all versions of the php package middlewares/www. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download middlewares/www
More information about middlewares/www
Files in middlewares/www
Package www
Short Description Middleware to add or remove the www subdomain in the host uri and returns a redirect response
License MIT
Homepage https://github.com/middlewares/www
Informations about the package www
middlewares/www
Middleware to add or remove the www
subdomain in the host uri and returns a redirect response. The following types of hosts wont be changed:
- The one word hosts, for example:
http://localhost
. - The ip based hosts, for example:
http://0.0.0.0
.
Requirements
- PHP >= 7.2
- A PSR-7 http library
- A PSR-15 middleware dispatcher
Installation
This package is installable and autoloadable via Composer as middlewares/www.
Usage
Set true
to add the www subdomain and false
to remove it.
Optionally, you can provide a Psr\Http\Message\ResponseFactoryInterface
as the second argument to create the redirect response (301
). If it's not defined, Middleware\Utils\Factory will be used to detect it automatically.
Please see CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.
All versions of www with dependencies
middlewares/utils Version ^3.0
psr/http-server-middleware Version ^1.0