mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Merge pull request #12 from nightscape/patch-1
Use more specific namespace declaration in Rack::Builder configuration.
This commit is contained in:
commit
7b74143147
1 changed files with 8 additions and 8 deletions
|
@ -20,14 +20,14 @@ module Rack
|
|||
# does not include: RemoteReferrer, AuthenticityToken and FormToken
|
||||
except = Array options[:except]
|
||||
Rack::Builder.new do
|
||||
use EscapedParams, options unless except.include? :escaped_params
|
||||
use FrameOptions, options unless except.include? :frame_options
|
||||
use IPSpoofing, options unless except.include? :ip_spoofing
|
||||
use JsonCsrf, options unless except.include? :json_csrf
|
||||
use PathTraversal, options unless except.include? :path_traversal
|
||||
use RemoteToken, options unless except.include? :remote_token
|
||||
use SessionHijacking, options unless except.include? :session_hijacking
|
||||
use XSSHeader, options unless except.include? :xss_header
|
||||
use ::Rack::Protection::EscapedParams, options unless except.include? :escaped_params
|
||||
use ::Rack::Protection::FrameOptions, options unless except.include? :frame_options
|
||||
use ::Rack::Protection::IPSpoofing, options unless except.include? :ip_spoofing
|
||||
use ::Rack::Protection::JsonCsrf, options unless except.include? :json_csrf
|
||||
use ::Rack::Protection::PathTraversal, options unless except.include? :path_traversal
|
||||
use ::Rack::Protection::RemoteToken, options unless except.include? :remote_token
|
||||
use ::Rack::Protection::SessionHijacking, options unless except.include? :session_hijacking
|
||||
use ::Rack::Protection::XSSHeader, options unless except.include? :xss_header
|
||||
run app
|
||||
end.to_app
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue