X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fplugs%2Finstance_static.ex;h=927fa26630fa0333207625fc53b4e37698340cb2;hb=9c1adb35dea9a4e86b68b98558b85de7210d563e;hp=02ee99e0f18ccba0dfd7b3c9479d3992f19c70fb;hpb=bee6acd51dc4e84e44caecf9d123dfff2f640a38;p=akkoma diff --git a/lib/pleroma/plugs/instance_static.ex b/lib/pleroma/plugs/instance_static.ex index 02ee99e0f..927fa2663 100644 --- a/lib/pleroma/plugs/instance_static.ex +++ b/lib/pleroma/plugs/instance_static.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors +# Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Plugs.InstanceStatic do @@ -21,7 +21,8 @@ defmodule Pleroma.Plugs.InstanceStatic do end end - @only ~w(index.html static emoji packs sounds images instance favicon.png) + @only ~w(index.html robots.txt static emoji packs sounds images instance favicon.png sw.js + sw-pleroma.js) def init(opts) do opts @@ -33,7 +34,7 @@ defmodule Pleroma.Plugs.InstanceStatic do for only <- @only do at = Plug.Router.Utils.split("/") - def call(conn = %{request_path: "/" <> unquote(only) <> _}, opts) do + def call(%{request_path: "/" <> unquote(only) <> _} = conn, opts) do call_static( conn, opts,