middlewares/www

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

middlewares/www

Latest Version on Packagist Software License Build Status Quality Score Total Downloads SensioLabs Insight

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:

Requirements
Installation

This package is installable and autoloadable via Composer as middlewares/www.

oser require middlewares/www
Example
patcher = new Dispatcher([
new Middlewares\Www(false)


ponse = $dispatcher->dispatch(new ServerRequest());
Options
__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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.