Favicon Plug: Update moduledoc and rename to adhere to convention
This commit is contained in:
parent
2388964b14
commit
662c9f36ac
2 changed files with 5 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ defmodule Pleroma.Web.Endpoint do
|
|||
}
|
||||
)
|
||||
|
||||
plug(Pleroma.Web.Plugs.Favicon,
|
||||
plug(Pleroma.Web.Plugs.FaviconPlug,
|
||||
at: "/",
|
||||
only: ["favicon.png"],
|
||||
cache_control_for_etags: @favicon_cache_control,
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
# Copyright © 2017-2026 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.Plugs.Favicon do
|
||||
defmodule Pleroma.Web.Plugs.FaviconPlug do
|
||||
@behaviour Plug
|
||||
|
||||
@moduledoc """
|
||||
Serves favicon.png directly from the instance static directory,
|
||||
bypassing the frontend-specific logic.
|
||||
This is a shim to call `Plug.Static` but with runtime `from` configuration for instance favicon.
|
||||
|
||||
Serves default or custom favicon.png with cacheable cache-control.
|
||||
"""
|
||||
|
||||
import Plug.Conn, only: [put_resp_header: 3]
|
||||
Loading…
Add table
Add a link
Reference in a new issue