Use middleware Rack::Head, Rack::Protection
This commit is contained in:
parent
8408e342a6
commit
7d66cef6bc
2 changed files with 6 additions and 3 deletions
|
@ -43,9 +43,10 @@ Gem::Specification.new do |spec|
|
|||
|
||||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename f }
|
||||
|
||||
spec.add_runtime_dependency 'puma', '~> 6.2', '>= 6.2.2'
|
||||
spec.add_runtime_dependency 'rack', '~> 2.2', '>= 2.2.7'
|
||||
spec.add_runtime_dependency 'sinatra', '~> 3.0', '>= 3.0.6'
|
||||
spec.add_runtime_dependency 'puma', '~> 6.2', '>= 6.2.2'
|
||||
spec.add_runtime_dependency 'rack', '~> 2.2', '>= 2.2.7'
|
||||
spec.add_runtime_dependency 'rack-protection', '~> 3.0', '>= 3.0.6'
|
||||
spec.add_runtime_dependency 'sinatra', '~> 3.0', '>= 3.0.6'
|
||||
|
||||
spec.add_development_dependency 'bundler', '~> 2.4'
|
||||
spec.add_development_dependency 'pry', '~> 0.14'
|
||||
|
|
|
@ -21,7 +21,9 @@ module Diversipub
|
|||
|
||||
def builder
|
||||
@builder ||= Rack::Builder.new.tap do |builder|
|
||||
builder.use Rack::Head
|
||||
builder.use Rack::Static, **rack_static_kwargs
|
||||
builder.use Rack::Protection
|
||||
builder.run @sinatra_app
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue