From fd2b04c6ec6c4a4145b7df8f600bc0fb9fda6c18 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Wed, 19 Jul 2023 14:09:37 -0300 Subject: [PATCH] Passthrough the configured MIME. (#175) --- Hypercube/src/Controller/HypercubeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hypercube/src/Controller/HypercubeController.php b/Hypercube/src/Controller/HypercubeController.php index 2b799220..891cabdb 100644 --- a/Hypercube/src/Controller/HypercubeController.php +++ b/Hypercube/src/Controller/HypercubeController.php @@ -89,7 +89,7 @@ public function ocr(Request $request): Response return new StreamedResponse( $this->cmd->execute($cmd_string, $body), 200, - ['Content-Type' => 'text/plain'] + ['Content-Type' => $request->headers->get('Accept') ?? 'text/plain'] ); } catch (\RuntimeException $e) { return new Response($e->getMessage(), 500);