aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/controllers/active_storage/disk_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/controllers/active_storage/disk_controller.rb')
-rw-r--r--activestorage/app/controllers/active_storage/disk_controller.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb
index 41e6d61bff..a7e10c0696 100644
--- a/activestorage/app/controllers/active_storage/disk_controller.rb
+++ b/activestorage/app/controllers/active_storage/disk_controller.rb
@@ -5,10 +5,12 @@
# Always go through the BlobsController, or your own authenticated controller, rather than directly
# to the service url.
class ActiveStorage::DiskController < ActionController::Base
+ skip_forgery_protection if default_protect_from_forgery
+
def show
if key = decode_verified_key
send_data disk_service.download(key),
- disposition: disposition_param, content_type: params[:content_type]
+ disposition: params[:disposition], content_type: params[:content_type]
else
head :not_found
end
@@ -38,10 +40,6 @@ class ActiveStorage::DiskController < ActionController::Base
ActiveStorage.verifier.verified(params[:encoded_key], purpose: :blob_key)
end
- def disposition_param
- params[:disposition].presence || "inline"
- end
-
def decode_verified_token
ActiveStorage.verifier.verified(params[:encoded_token], purpose: :blob_token)