add correct content type for catch-all
authorRoger Braun <roger@rogerbraun.net>
Tue, 22 Aug 2017 12:22:36 +0000 (14:22 +0200)
committerRoger Braun <roger@rogerbraun.net>
Tue, 22 Aug 2017 12:22:36 +0000 (14:22 +0200)
lib/pleroma/web/router.ex

index 34207a62f3785326d7206a1b11b0ce4e46dba606..d42981ee0859c19a07c53476972e4ca3f24fa58f 100644 (file)
@@ -107,5 +107,11 @@ end
 
 defmodule Fallback.RedirectController do
   use Pleroma.Web, :controller
-  def redirector(conn, _params), do: (if Mix.env != :test, do: send_file(conn, 200, "priv/static/index.html"))
+  def redirector(conn, _params) do
+    if Mix.env != :test do
+      conn
+      |> put_resp_content_type("text/html")
+      |> send_file(200, "priv/static/index.html")
+    end
+  end
 end