From e477608b7e87cc9adfaab8d91fb614ce1c0b8505 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 22 Aug 2017 14:22:36 +0200 Subject: [PATCH] add correct content type for catch-all --- lib/pleroma/web/router.ex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 34207a62f..d42981ee0 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -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