diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/plugs/static_fe_plug.ex | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/lib/pleroma/plugs/static_fe_plug.ex b/lib/pleroma/plugs/static_fe_plug.ex index deebe4879..156e6788e 100644 --- a/lib/pleroma/plugs/static_fe_plug.ex +++ b/lib/pleroma/plugs/static_fe_plug.ex @@ -21,6 +21,9 @@ defmodule Pleroma.Plugs.StaticFEPlug do    defp enabled?, do: Pleroma.Config.get([:static_fe, :enabled], false)    defp accepts_html?(conn) do -    conn |> get_req_header("accept") |> List.first() |> String.contains?("text/html") +    case get_req_header(conn, "accept") do +      [accept | _] -> String.contains?(accept, "text/html") +      _ -> false +    end    end  end | 
