Class: Datadog::AppSec::Contrib::Sinatra::RequestMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/appsec/contrib/sinatra/request_middleware.rb

Overview

Rack middleware for AppSec on Sinatra

Instance Method Summary collapse

Constructor Details

#initialize(app, opt = {}) ⇒ RequestMiddleware

Returns a new instance of RequestMiddleware.



9
10
11
# File 'lib/datadog/appsec/contrib/sinatra/request_middleware.rb', line 9

def initialize(app, opt = {})
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
# File 'lib/datadog/appsec/contrib/sinatra/request_middleware.rb', line 13

def call(env)
  @app.call(env)
end