From 7a2c52531a62a7acfc6ff1bc5078d72c6dba3d38 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 8 Jan 2023 16:34:34 +0100 Subject: [PATCH] Fix bad spelling --- app/Exceptions/Handler.php | 1 + app/Http/Middleware/AcceptHeaders.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 98ee8323bd..aab0b085da 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -65,6 +65,7 @@ class Handler extends ExceptionHandler TokenMismatchException::class, HttpException::class, SuspiciousOperationException::class, + BadHttpHeaderException::class, ]; /** diff --git a/app/Http/Middleware/AcceptHeaders.php b/app/Http/Middleware/AcceptHeaders.php index 8debaf520d..c7de9c452b 100644 --- a/app/Http/Middleware/AcceptHeaders.php +++ b/app/Http/Middleware/AcceptHeaders.php @@ -46,8 +46,8 @@ class AcceptHeaders { $method = $request->getMethod(); - if ('GET' === $method && !$request->accepts(['application/json', 'application/vdn.api+json'])) { - throw new BadHttpHeaderException('Your request must accept either application/json or application/vdn.api+json.'); + if ('GET' === $method && !$request->accepts(['application/json', 'application/vnd.api+json'])) { + throw new BadHttpHeaderException('Your request must accept either application/json or application/vnd.api+json'); } $allowed = ['application/x-www-form-urlencoded', 'application/json','']; $submitted = (string)$request->header('Content-Type');