From e12f3e3917926a47c0803bc7efcfca7e0e7b92e6 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 26 Mar 2026 15:34:54 -0400 Subject: [PATCH] Add representation proxy Cache-Control test --- 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 8964a437f..98b7abde4 100644 --- a/test/integration/active_storage_authorization_test.rb +++ b/test/integration/active_storage_authorization_test.rb @@ -166,6 +166,14 @@ class ActiveStorageAuthorizationTest < ActionDispatch::IntegrationTest assert_includes response.headers["Cache-Control"], "public" end + test "representation proxy for non-public blob does not set public Cache-Control" do + sign_in_as :david + + get rails_storage_proxy_path(@blob.representation(resize_to_limit: [ 100, 100 ])) + assert_response :success + assert_not_includes response.headers["Cache-Control"], "public" + end + # Account exports test "export owner can download their export" do