Download the PHP package guenbakku/cake-middleware without Composer
On this page you can find all versions of the php package guenbakku/cake-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download guenbakku/cake-middleware
More information about guenbakku/cake-middleware
Files in guenbakku/cake-middleware
Package cake-middleware
Short Description Collection of middlewares for CakePHP
License MIT
Informations about the package cake-middleware
CakePHP Middleware Collection
Collection of CakePHP Middlewares.
Requirement
- PHP 7.0 or higher
- CakePHP 3.5 or higher
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
List of middlewares
Http\ClientTimezoneMiddleware
Determine timezone of client. This will check value with the following priority:
- query parameter (default:
timezone) - request header (default:
X-Timezone)
Support timezone:
https://www.php.net/manual/en/timezones.php
Http\CorsMiddleware
Add Access-Control-Allow-Origin and other related headers to resources on an API, make that API can be called via cross origin.
NOTE: CorsMiddleware should be inserted into the first position of Middleware queue (before Cake\Error\Middleware\ErrorHandlerMiddleware) to make it still work correctly in case there is exception thrown from inside of your application.
Http\LocaleSelectorMiddleware
Sets the runtime default locale for the request based on the Accept-Language header. The default will only be set if it matches the list of passed valid locales.
This is a customized middleware of \Cake\I18n\Middleware\LocaleSelectorMiddleware but different with the original middleware, this only gets the first 2 characters in locale code (ISO 639-1 language code, e.g: en, ja...).