From 0c541015ddb8441b210442db7442c1402018eecb Mon Sep 17 00:00:00 2001 From: Jan Kessler Date: Tue, 2 Jul 2024 16:32:26 +0200 Subject: [PATCH] set Content-Disposition header for formats without player to serve them as downloadable content (without breaking protected recordings) (#1084) --- app/controllers/playback_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/playback_controller.rb b/app/controllers/playback_controller.rb index 2619d1ce..8f87fa2c 100644 --- a/app/controllers/playback_controller.rb +++ b/app/controllers/playback_controller.rb @@ -96,6 +96,7 @@ def deliver_resource resource_path = request.original_fullpath static_resource_path = "/static-resource#{resource_path}" response.headers['X-Accel-Redirect'] = static_resource_path + response.headers['Content-Disposition'] = "attachment" unless %w[presentation video screenshare].include?(@playback_format.format) head(:ok) end