instance method
gzip_file_path
Ruby on Rails 6.0.6
Since v4.2.9 Last seen in v6.0.6 PrivateSignature
gzip_file_path(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 89
def gzip_file_path(path)
can_gzip_mime = content_type(path) =~ /\A(?:text\/|application\/javascript)/
gzip_path = "#{path}.gz"
if can_gzip_mime && File.exist?(File.join(@root, ::Rack::Utils.unescape_path(gzip_path)))
gzip_path
else
false
end
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler