All notable changes to this project will be documented in this file, in reverse chronological order by release.
1.4.3 - 2020-10-11
1.4.2 - 2022-10-10
1.4.1 - 2022-10-07
- PHPStan annotations for the constructor (#73).
1.4.0 - 2022-10-06
- Support for
neomerx/cors-psr7:^3.0
(#72).
- PHP 7.2 is now the minimum requirement (#63).
- PHPStan now uses strict rules (#63).
- Upgrade to
neomerx/cors-psr7:^2.0
(#67).
1.3.0 - 2022-04-13
- Support for wildcard origins (#56).
1.2.1 - 2020-10-29
- Bump minimum requirement of
tuupola/http-factory
to1.0.2
. This is to avoid Composer 2 installing the broken1.0.1
version which will also causepsr/http-factory
to be removed. (#50)
1.2.0 - 2020-09-09
- Allow installing with PHP 8 (#49).
1.1.1 - 2019-10-30
- Concatenate
Access-Control-Expose-Headers
values with comma instead of comma and space (#44). Edge has issues with spaces.
1.1.0 - 2019-10-08
- Send multiple
Access-Control-Expose-Headers
values in one header (#40, #42). - Coding standard is now PSR-12 (#35)
1.0.0 - 2019-06-04
tuupola/callable-handler:^1.0
is now minimum requirement.tuupola/http-factory:^1.0
is now minimum requirement.
0.9.4 - 2019-03-24
psr/http-message:^1.0.1
is now minimum requirement.
- Static analysis (#32).
0.9.3 - 2019-02-25
0.9.2 - 2019-01-26
- Do not assume
error
andmethods
callables are an instance of aClosure
(#26).
0.9.1 - 2018-10-15
- Support for
tuupola/callable-handler:^1.0
andtuupola/http-factory:^1.0
neomerx/cors-psr7:^1.0.4
is now minimum requirement.
0.9.0 - 2018-08-21
- New option
origin.server
to specify the origin of the server. Helps when same-origin requests include a valid but unesseccaryOrigin
header (#22, #23).
0.8.0 - 2018-08-07
- Support for the stable version of PSR-17
- Use released version of equip/dispatch in tests.
0.7.0 - 2017-01-25
- Support for the approved version of PSR-15.
0.6.0 - 2017-12-25
-
Support for the latest version of PSR-15.
-
Methods setting can now be either an array or callable returning an array. This is useful if your framework makes it possible to retrieve defined methods for a given route.
$app->add(new \Tuupola\Middleware\CorsMiddleware([ "methods" => ["GET", "POST", "PUT", "PATCH", "DELETE"], ]));
$app->add(new \Tuupola\Middleware\CorsMiddleware([ "methods" => function(ServerRequestInterface $request) { /* Some logic to figure out allowed $methods. */ return $methods; } ]));
- Classname changed from Cors to CorsMiddleware.
- Settings can now be passed only in the constructor.
- PHP 7.1 is now minimum requirement.
- Inside error handler
$this
now refers to the middleware itself. - PSR-7 double pass is now supported using tuupola/callable-handler library.
- Support for PHP 5.X. PSR-15 is now PHP 7.x only.
- Public getters and setters for the settings.
0.5.2 - 2016-08-12
- Middleware was overriding the passed in response (#1).
0.5.1 - 2016-04-25
- Diactoros was erroring with integer header values.
Initial release. Support PSR-7 style doublepass middlewares.