respond to HEAD file proxy

This commit is contained in:
Pete Matsyburka
2026-04-30 17:43:42 +03:00
parent 2dec099f20
commit 1503375eed
@@ -33,9 +33,15 @@ module Api
else
http_cache_forever public: true do
response.headers['Accept-Ranges'] = 'bytes'
response.headers['Content-Length'] = blob.byte_size.to_s
send_blob_stream blob, disposition: params[:disposition]
if request.head?
response.headers['Content-Type'] = blob.content_type_for_serving
head :ok
else
send_blob_stream blob, disposition: params[:disposition]
end
response.headers['Content-Length'] = blob.byte_size.to_s
end
end
end