Skip to content

Commit

Permalink
fewer changes, comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga committed Mar 18, 2024
1 parent 596e810 commit c71c114
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/plausible_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,12 @@ defmodule PlausibleWeb.Endpoint do
plug(PlausibleWeb.Tracker)
plug(PlausibleWeb.Favicon)

static_paths = ~w(css js images favicon.ico)

static_paths =
on_full_build do
static_paths
else
static_paths ++ ["robots.txt"]
end

plug(Plug.Static,
at: "/",
from: :plausible,
gzip: false,
only: static_paths
# NOTE: Plausible Cloud uses a custom robots.txt: https://plausible.io/robots.txt
only: ~w(css js images favicon.ico robots.txt)
)

on_full_build do
Expand Down

0 comments on commit c71c114

Please sign in to comment.