fix: fix content-type and cache-control headers for images

This commit is contained in:
Neetpone 2024-04-13 21:04:32 -04:00
parent 8d4fd01011
commit ad03c88a97

View file

@ -26,7 +26,8 @@ class ImagesController < ApplicationController
File.binwrite path, body
end
send_file path, disposition: :inline, content_type: content_type
response.headers['Cache-Control'] = 'public'
send_file path, disposition: :inline, type: content_type
end
private