mirror of
https://github.com/flarum/core.git
synced 2025-02-25 19:53:48 +01:00
Make JSON parameter middleware a bit more generic
This commit is contained in:
parent
33ae52a30c
commit
7f83552cbb
@ -11,7 +11,7 @@ class ReadJsonParameters implements MiddlewareInterface
|
||||
*/
|
||||
public function __invoke(Request $request, Response $response, callable $out = null)
|
||||
{
|
||||
if (str_contains($request->getHeaderLine('content-type'), 'application/vnd.api+json')) {
|
||||
if (str_contains($request->getHeaderLine('content-type'), 'json')) {
|
||||
$input = json_decode($request->getBody(), true);
|
||||
|
||||
foreach ($input as $name => $value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user