From d03b31450f5e34772fa57367438c3914aef1743d Mon Sep 17 00:00:00 2001 From: Uku Taht <uku.taht@gmail.com> Date: Fri, 28 May 2021 11:20:25 +0300 Subject: [PATCH] Removes cache-control header from tracker file --- lib/plausible_web/plugs/tracker.ex | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/plausible_web/plugs/tracker.ex b/lib/plausible_web/plugs/tracker.ex index d4a84b54..ee399fa0 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) -- GitLab