Support HEAD requests. Fixes #1021.
This commit is contained in:
parent
fd85ca90a3
commit
da34153e0c
|
@ -2,6 +2,7 @@
|
||||||
require "rack"
|
require "rack"
|
||||||
require "rack/file"
|
require "rack/file"
|
||||||
require "rack/lint"
|
require "rack/lint"
|
||||||
|
require "rack/head"
|
||||||
|
|
||||||
module Middleman
|
module Middleman
|
||||||
module CoreExtensions
|
module CoreExtensions
|
||||||
|
@ -69,6 +70,7 @@ module Middleman
|
||||||
@rack_app ||= begin
|
@rack_app ||= begin
|
||||||
app = ::Rack::Builder.new
|
app = ::Rack::Builder.new
|
||||||
app.use Rack::Lint
|
app.use Rack::Lint
|
||||||
|
app.use Rack::Head
|
||||||
|
|
||||||
Array(@middleware).each do |klass, options, block|
|
Array(@middleware).each do |klass, options, block|
|
||||||
app.use(klass, *options, &block)
|
app.use(klass, *options, &block)
|
||||||
|
|
Loading…
Reference in a new issue