commit: 58cfa90dd99d2324eb3344e31d8ee0420deb2658
parent: 9f82f67e896b11333280acb10b739347ad0828dd
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 16 Feb 2020 05:14:59 +0100
static_fe_plug.ex: Remove accept_html?
Why would one support HTTP but not HTML? We will give it HTML anyway
Diffstat:
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/pleroma/plugs/static_fe_plug.ex b/lib/pleroma/plugs/static_fe_plug.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.StaticFEPlug do
@@ -9,7 +9,7 @@ defmodule Pleroma.Plugs.StaticFEPlug do
def init(options), do: options
def call(conn, _) do
- if enabled?() and accepts_html?(conn) do
+ if enabled?() do
conn
|> StaticFEController.call(:show)
|> halt()
@@ -19,8 +19,4 @@ defmodule Pleroma.Plugs.StaticFEPlug do
end
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")
- end
end