From 14e6832507fb2981ceb83b49d6c9add70b4f445e Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 26 Mar 2026 15:22:21 -0400 Subject: [PATCH] Add regression test for public blob Cache-Control --- test/integration/active_storage_authorization_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/integration/active_storage_authorization_test.rb b/test/integration/active_storage_authorization_test.rb index 3394a9990..8964a437f 100644 --- a/test/integration/active_storage_authorization_test.rb +++ b/test/integration/active_storage_authorization_test.rb @@ -158,6 +158,14 @@ class ActiveStorageAuthorizationTest < ActionDispatch::IntegrationTest assert_not_includes response.headers["Cache-Control"], "public" end + test "proxy for publicly accessible blob sets public Cache-Control" do + blob = attach_avatar_to(users(:david)) + + get rails_storage_proxy_path(blob) + assert_response :success + assert_includes response.headers["Cache-Control"], "public" + end + # Account exports test "export owner can download their export" do