Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Removes cache-control header from tracker file

Uku Tahtd03b31450f5e
diff --git a/lib/plausible_web/plugs/tracker.ex b/lib/plausible_web/plugs/tracker.ex
index d4a84b54c3..ee399fa017 100644
--- a/lib/plausible_web/plugs/tracker.ex
+++ b/lib/plausible_web/plugs/tracker.ex
@@ -38,9 +38,6 @@ defmodule PlausibleWeb.Tracker do
@templates files_available
@aliases aliases_available
- #  1 hour
- @max_age 3600
-
def init(_) do
all_files =
Enum.reduce(@templates, %{}, fn template_filename, all_files ->
@@ -64,7 +61,6 @@ defmodule PlausibleWeb.Tracker do
location = Application.app_dir(:plausible, "priv/tracker/js/" <> found)
conn
- |> put_resp_header("cache-control", "max-age=#{@max_age},public")
|> put_resp_header("content-type", "application/javascript")
|> put_resp_header("cross-origin-resource-policy", "cross-origin")
|> send_file(200, location)