mirror of
https://github.com/docusealco/docuseal.git
synced 2026-06-23 04:10:11 +00:00
respond to HEAD file proxy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user