mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
Fixed bad host header in PSR-7 (if using 'php -S localhost:8000 system/router.php')
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
* Fixed a bug in `FormFlashFile::moveTo()` not deleting the old file
|
* Fixed a bug in `FormFlashFile::moveTo()` not deleting the old file
|
||||||
* Fixed `FlexMediaTrait::getMedia()` trying to include uploaded but already moved media
|
* Fixed `FlexMediaTrait::getMedia()` trying to include uploaded but already moved media
|
||||||
* Fixed `ImageMedium` constructor warning when file does not exist
|
* Fixed `ImageMedium` constructor warning when file does not exist
|
||||||
|
* Fixed bad host header in PSR-7 (if using 'php -S localhost:8000 system/router.php')
|
||||||
|
|
||||||
# v1.6.0-beta.8
|
# v1.6.0-beta.8
|
||||||
## 01/25/2019
|
## 01/25/2019
|
||||||
|
|||||||
30
composer.lock
generated
30
composer.lock
generated
@@ -52,16 +52,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/ca-bundle",
|
"name": "composer/ca-bundle",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/composer/ca-bundle.git",
|
"url": "https://github.com/composer/ca-bundle.git",
|
||||||
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
|
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
|
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
||||||
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
|
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
"ssl",
|
"ssl",
|
||||||
"tls"
|
"tls"
|
||||||
],
|
],
|
||||||
"time": "2018-10-18T06:09:13+00:00"
|
"time": "2019-01-28T09:30:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
@@ -538,17 +538,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gregwar/image",
|
"name": "gregwar/image",
|
||||||
"version": "v2.0.23",
|
"version": "v2.0.24",
|
||||||
"target-dir": "Gregwar/Image",
|
"target-dir": "Gregwar/Image",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Gregwar/Image.git",
|
"url": "https://github.com/Gregwar/Image.git",
|
||||||
"reference": "25fbb91a95d41d44587ee7ca8923745b66221a7d"
|
"reference": "52145816255dd20cb4bb115d0f9e1030c6287994"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Gregwar/Image/zipball/25fbb91a95d41d44587ee7ca8923745b66221a7d",
|
"url": "https://api.github.com/repos/Gregwar/Image/zipball/52145816255dd20cb4bb115d0f9e1030c6287994",
|
||||||
"reference": "25fbb91a95d41d44587ee7ca8923745b66221a7d",
|
"reference": "52145816255dd20cb4bb115d0f9e1030c6287994",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -586,7 +586,7 @@
|
|||||||
"gd",
|
"gd",
|
||||||
"image"
|
"image"
|
||||||
],
|
],
|
||||||
"time": "2018-10-25T17:12:13+00:00"
|
"time": "2019-01-27T15:10:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
@@ -3928,16 +3928,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/environment",
|
"name": "sebastian/environment",
|
||||||
"version": "4.0.1",
|
"version": "4.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||||
"reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f"
|
"reference": "4a43e9af57b4afa663077b9bc85255dbc6e8a2bd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/febd209a219cea7b56ad799b30ebbea34b71eb8f",
|
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4a43e9af57b4afa663077b9bc85255dbc6e8a2bd",
|
||||||
"reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f",
|
"reference": "4a43e9af57b4afa663077b9bc85255dbc6e8a2bd",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3974,7 +3974,7 @@
|
|||||||
"environment",
|
"environment",
|
||||||
"hhvm"
|
"hhvm"
|
||||||
],
|
],
|
||||||
"time": "2018-11-25T09:31:21+00:00"
|
"time": "2019-01-28T15:26:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
|
|||||||
@@ -26,7 +26,13 @@ class RequestServiceProvider implements ServiceProviderInterface
|
|||||||
$psr17Factory // StreamFactory
|
$psr17Factory // StreamFactory
|
||||||
);
|
);
|
||||||
|
|
||||||
return $creator->fromGlobals();
|
$request = $creator->fromGlobals();
|
||||||
|
|
||||||
|
// TODO: Remove workaround for bad host header (if using 'php -S localhost:8000 system/router.php').
|
||||||
|
$hosts = $request->getHeader('Host');
|
||||||
|
$host = end($hosts);
|
||||||
|
|
||||||
|
return $request->withHeader('Host', $host);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user