minor tweaks
This commit is contained in:
parent
16b8ba89a8
commit
216ebed109
2 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,7 @@ module Middleman
|
|||
# Rack helper for adding mime-types during local preview
|
||||
def self.mime(ext, type)
|
||||
ext = ".#{ext}" unless ext.to_s[0] == ?.
|
||||
Rack::Mime::MIME_TYPES[ext.to_s] = type
|
||||
::Rack::Mime::MIME_TYPES[ext.to_s] = type
|
||||
end
|
||||
|
||||
# Convenience function to discover if a tempalte exists for the requested renderer (haml, sass, etc)
|
||||
|
|
|
@ -9,7 +9,8 @@ module Middleman
|
|||
|
||||
def call(env)
|
||||
path = env["PATH_INFO"]
|
||||
if path.include?("favicon.ico") || File.exists?(File.join(Middleman::Base.public, path))
|
||||
file_path = File.join(Middleman::Base.public, path)
|
||||
if path.include?("favicon.ico") || (File.exists?(file_path) && !File.directory?(file_path))
|
||||
@file_server.call(env)
|
||||
else
|
||||
@app.call(env)
|
||||
|
|
Loading…
Reference in a new issue