From 7e52d0ae582593848cc8c05cdeb7669667f6c151 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Thu, 21 May 2020 10:35:25 -0400 Subject: [PATCH] Preserve old redirect URLs They may be cached for existing apps upgrading to 6.1. Follows up on #34477. --- activestorage/config/routes.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activestorage/config/routes.rb b/activestorage/config/routes.rb index dfc7bf577d..5da20d5c39 100644 --- a/activestorage/config/routes.rb +++ b/activestorage/config/routes.rb @@ -4,9 +4,11 @@ Rails.application.routes.draw do scope ActiveStorage.routes_prefix do get "/blobs/redirect/:signed_id/*filename" => "active_storage/blobs/redirect#show", as: :rails_service_blob get "/blobs/proxy/:signed_id/*filename" => "active_storage/blobs/proxy#show", as: :rails_service_blob_proxy + get "/blobs/:signed_id/*filename" => "active_storage/blobs/redirect#show" get "/representations/redirect/:signed_blob_id/:variation_key/*filename" => "active_storage/representations/redirect#show", as: :rails_blob_representation get "/representations/proxy/:signed_blob_id/:variation_key/*filename" => "active_storage/representations/proxy#show", as: :rails_blob_representation_proxy + get "/representations/:signed_blob_id/:variation_key/*filename" => "active_storage/representations/redirect#show" get "/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_service put "/disk/:encoded_token" => "active_storage/disk#update", as: :update_rails_disk_service