add protection
This commit is contained in:
parent
d1cb2c7a92
commit
726190634b
1
Gemfile
1
Gemfile
|
@ -4,6 +4,7 @@ source :rubygems
|
|||
|
||||
gem 'puma'
|
||||
gem 'rack-ssl', '~> 1.3'
|
||||
gem 'rack-protection', '~> 1.3'
|
||||
gem 'rack-cache'
|
||||
gem 'sinatra'
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ GEM
|
|||
rack (1.4.1)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rack-protection (1.2.0)
|
||||
rack-protection (1.3.2)
|
||||
rack
|
||||
rack-ssl (1.3.2)
|
||||
rack
|
||||
|
@ -128,6 +128,7 @@ DEPENDENCIES
|
|||
localeapp-handlebars_i18n
|
||||
puma
|
||||
rack-cache
|
||||
rack-protection (~> 1.3)
|
||||
rack-ssl (~> 1.3)
|
||||
rake (~> 0.9.2)
|
||||
rake-pipeline!
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'rack'
|
||||
require 'rack/ssl'
|
||||
require 'rack/cache'
|
||||
require 'rack/protection'
|
||||
require 'delegate'
|
||||
require 'time'
|
||||
|
||||
|
@ -130,6 +131,9 @@ class Travis::Web::App
|
|||
end
|
||||
builder.use Rack::Deflater
|
||||
builder.use Rack::Head
|
||||
builder.use Rack::Protection::XssHeader
|
||||
builder.use Rack::Protection::FrameOptions
|
||||
builder.use Rack::Protection::PathTraversal
|
||||
builder.use Rack::ConditionalGet
|
||||
builder.use MobileRedirect
|
||||
builder.run router
|
||||
|
|
Loading…
Reference in New Issue
Block a user