aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-03-11 17:58:25 +0300
committerrinpatch <rinpatch@sdf.org>2020-03-15 16:59:39 +0300
commit80bc8c2cc980b5e3270110313514a5bad2d3c9fb (patch)
treedd5f1bf099d7f45a50e8879671a9e99e191632dc
parent2183d8f8499c19e3d24028426ae7b29edba7175b (diff)
downloadpleroma-80bc8c2cc980b5e3270110313514a5bad2d3c9fb.tar.gz
Revert "Set better Cache-Control header for static content"
On furher investigation it seems like all that did was cause unintuitive behavior. The emoji request flood that was the reason for introducing it isn't really that big of a deal either, since Plug.Static only needs to read file modification time and size to determine the ETag. Closes #1613
-rw-r--r--lib/pleroma/web/endpoint.ex2
-rw-r--r--test/plugs/cache_control_test.exs2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex
index 118c3ac6f..72cb3ee27 100644
--- a/lib/pleroma/web/endpoint.ex
+++ b/lib/pleroma/web/endpoint.ex
@@ -12,7 +12,7 @@ defmodule Pleroma.Web.Endpoint do
plug(Pleroma.Plugs.HTTPSecurityPlug)
plug(Pleroma.Plugs.UploadedMedia)
- @static_cache_control "public max-age=86400 must-revalidate"
+ @static_cache_control "public, no-cache"
# InstanceStatic needs to be before Plug.Static to be able to override shipped-static files
# If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well
diff --git a/test/plugs/cache_control_test.exs b/test/plugs/cache_control_test.exs
index 005912ffb..6b567e81d 100644
--- a/test/plugs/cache_control_test.exs
+++ b/test/plugs/cache_control_test.exs
@@ -9,7 +9,7 @@ defmodule Pleroma.Web.CacheControlTest do
test "Verify Cache-Control header on static assets", %{conn: conn} do
conn = get(conn, "/index.html")
- assert Conn.get_resp_header(conn, "cache-control") == ["public max-age=86400 must-revalidate"]
+ assert Conn.get_resp_header(conn, "cache-control") == ["public, no-cache"]
end
test "Verify Cache-Control header on the API", %{conn: conn} do