diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb index e5c7ef0c..f1dfa634 100644 --- a/app/controllers/tracks_controller.rb +++ b/app/controllers/tracks_controller.rb @@ -109,6 +109,9 @@ def audio_with_stream(stream, mimetype, total_size) response.content_type = mimetype response.headers['accept-ranges'] = 'bytes' response.headers['content-length'] = (last_byte - first_byte + 1).to_s + # Workaround for https://github.com/rack/rack/issues/1619 + # Remove when rack 3.0 is released + response.headers['last-modified'] = Time.now.httpdate to_skip = first_byte while to_skip.positive?