Set content-type to application/json
authorEkaterina Vaartis <vaartis@kotobank.ch>
Fri, 29 Oct 2021 10:58:24 +0000 (13:58 +0300)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:48:44 +0000 (20:48 +0100)
lib/pleroma/search/meilisearch.ex

index b8248e40ceb8f17ced75087a535447be343676ec..d94ab8b6463278ee56e8790b95c9de56a6595923 100644 (file)
@@ -10,7 +10,8 @@ defmodule Pleroma.Search.Meilisearch do
   defp meili_headers() do
     private_key = Pleroma.Config.get([Pleroma.Search.Meilisearch, :private_key])
 
-    if is_nil(private_key), do: [], else: [{"X-Meili-API-Key", private_key}]
+    [{"Content-Type", "application/json"}] ++
+      if is_nil(private_key), do: [], else: [{"X-Meili-API-Key", private_key}]
   end
 
   def meili_get!(path) do