Name: www
Owner: Middlewares
Description: PSR-15 middleware to add or remove the www subdomain
Created: 2016-10-08 08:37:23.0
Updated: 2018-01-24 20:26:04.0
Pushed: 2018-01-24 20:35:05.0
Homepage: null
Size: 22
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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:
http://localhost
.http://0.0.0.0
.This package is installable and autoloadable via Composer as middlewares/www.
oser require middlewares/www
patcher = new Dispatcher([
new Middlewares\Www(false)
ponse = $dispatcher->dispatch(new ServerRequest());
__construct(bool $www)
Set true
to add the www subdomain and false
to remove it.
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.